Masked inputs
Display user input in a given format
- Requires: jQuery Mask plug-in
This plug-in displays user input data passed through a masking filter - i.e. it reformats the user input into an attractive format. This can be useful for telephone numbers, credit card numbers, e-mail address, car registration numbers and many more. It is also used to help ensure that the user inputs expected data (for example in the case of credit cards, only number characters would be accepted).
This plug-in makes use of the jQuery Mask plug- in from Igor Escobar which is MIT licensed.
The mask plug-in used is primarily configured by the mask
option that is
documented below. The placeholder
and maskOptions
are also available and
expose the full range of options available for the masking software.
Plug-in configuration and API
Options
This field type supports the following options, in addition to the default field-options
configuration:
string
mask
: The mask to apply. The default special characters are:0
- Numeric character9
- Optional numeric character#
- Recursive numeric characterA
- Letter or numberS
- Letter only
string
placeholder
: The placeholder to show in the input. This can be useful to let the user know what format is expected in the input.object
maskOptions
: Options passed directly to the jQuery mask plug-in. Please refer to the plug-ins documentation for the full range of options.
Methods
This plug-in does not provide any additional methods over those available for the all fields (see field()
).
License required
The Editor plug-ins are available to download for licensed users of Editor only. If you already have an Editor license, please sign-in. Otherwise, an Editor license can be purchased to be able to access the plug-ins.