I am using masked input 1.2.2 Jquery plugin from digitalbush.com.I want to have the first three digits of a telephone no to be fixed ie. 679-###-####.So my masked input is '679-###-####'.Problem I am facing is when I have the focus on the text-box where I enter the telephone no and submit the form the no 679 is getting appended like 679-679- .Please help. Thanks, Raj
This is my function that calls the .mask of masked input plugin:
function Extend_Fiji_Phone() {
$("input[type='text'][sfwExtendPhone='true']") .mask('679-###-####') .blur(function (e) { }); }
Below is my mask definition:
$.mask = {
//Predefined character definitions definitions:
{ '#': "[0-9]", 'a': "[A-Za-z]", '*': "[A-Za-z0-9]" } }
I also tried using the version 1.3.1 of Masked input,In this case the values entered into the text box gets cleared on form submit when the total no of characters entered is less than 10 along with the three fixed characters.When all characters are entered then on form submit the three characters after the fixed three characters ie. '679' get replaced by '679'. So if I have entered 679-123-4843 then on form submit it changes to 679-679-4843 and on next submit changes to 679-679-6793.