mask CPF e Tel
Re: mask CPF e Tel
Hi,
what do you try to acheive. Can you make an example?
what do you try to acheive. Can you make an example?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: mask CPF e Tel
good afternoon!
It would be so for phone (xx) xxxxx-xxxxx
Cpf: xxx.xxx.xxx-xx
When the user enters the mask is ready
It would be so for phone (xx) xxxxx-xxxxx
Cpf: xxx.xxx.xxx-xx
When the user enters the mask is ready
Re: mask CPF e Tel
Was it not possible for you to use the built-in format option? Eventually add/edit date formats?
Re: mask CPF e Tel
This jquery mask also works extremely well and includes input validation. I use it myself.
https://github.com/RobinHerbots/Inputmask
Can be loaded with hooks.
Call the jquery.inputmask.bundle.js in your hooks/header-extras.php
and include the jquery Inputmask function in your hooks/tablename-dv.js
You can even add jquery UI widgets (datepicker etc) to what would otherwise be a text field.
Just use the field <id> as the selector. The plugin is comprehensive, has good usage instruction and plenty of examples.
Example:
https://github.com/RobinHerbots/Inputmask
Can be loaded with hooks.
Call the jquery.inputmask.bundle.js in your hooks/header-extras.php
and include the jquery Inputmask function in your hooks/tablename-dv.js
You can even add jquery UI widgets (datepicker etc) to what would otherwise be a text field.
Just use the field <id> as the selector. The plugin is comprehensive, has good usage instruction and plenty of examples.
Example:
Code: Select all
$j(document).ready(function(){
$j(#yourfield).inputmask("99-9999999"); //static mask
$j(#yourfield).inputmask({"mask": "(999) 999-9999"}); //specifying options
$j(#yourfield).inputmask("9-a{1,3}9{1,3}"); //mask with dynamic syntax
$j('#dob').datepicker({
dateFormat: 'dd/mm/yy',
yearRange: '-100:+0',
changeMonth: true,
changeYear: true
}).inputmask('dd/mm/yyyy');
});