site-forms-placeholders
v1.0.2
Published
Plugin activating the dynamics of the placeholders in the specified form (block)
Downloads
1
Maintainers
Readme
site-forms-placeholders
Plugin activating the dynamics of the placeholders in the specified form (block).
Install
npm i site-forms-placeholders
Import
const placeholder = require("site-forms-placeholders");
or
import placeholder from 'site-forms-placeholders'
Option (selector)
Type: string
Default: [data-placeholder-form]
A selector of forms or a blocks inside of which must be activated by the dynamics of the playercholders.
Usage
const placeholder = require("site-forms-placeholders");
placeholder("your-selector");
or
const placeholder = require("site-forms-placeholders");
placeholder();
Note
You can not indicate the selector if the forms (blocks) has an attribute data-placeholder-form
Example:
<form action="#" data-placeholder-form>
...
<input placeholder="The text of the placeholder 1">
...
<input placeholder="The text of the placeholder 2">
...
<input placeholder="The text of the placeholder 3">
...
<textarea placeholder="The text of the placeholder for textarea"></textarea>
...
</form>