The advanced help pages are blank and the readme simply refers users to said blank help pages. I have installed the module, configured the library, and don't seem to have a new masked input widget to use with my forms.

I am also building a custom form and would like to use the API, but I can't decipher it from the code itself.

Any help would be appreciated. Thanks.

Comments

nirad’s picture

What exactly does this do besides install the library? Do you need to write custom jQuery functions in order for this to work? I could not find any place where this hooks into a field's configuration. I would like to use this with webform fields if possible.

john.p.baldwin.jr’s picture

If you add a text/long text/float/integer field to your content type, one of the widget options is "Masked Input."

+1 for improved documentation.

abel_osorio’s picture

I need this help too.

Thanks

Estherminator’s picture

If I get it right it works on content input only? Is there a way of making it work with user forms?

helior’s picture

You can alter any textfield form element to have the masked-input feature. It would look something like this:

$form['date']['#type'] = 'masked_input';
$form['date']['#mask'] = '99/99/9999';
$form['date']['#placeholder'] = '_';

If for whatever reason you you couldn't change the #type because that would break a certain feature, you can do this instead:

masked_input_attach_to($form['date']);