0

I'm having a little issue with a masked input with jquery:

I have a phonenumber text input, I masked it like

$("#phone").mask("9999-9999999");

It works great but when i am trying to populate value in phone number field while editing,it is not showing.

When I just click reset button it appears.

I am using jquery-1.5.2.min.js and jquery.maskedinput.js - Version: 1.2.2

Kara
  • 6,115
  • 16
  • 50
  • 57
phpwomen
  • 3
  • 10

2 Answers2

0

You can set value of masked value like this:

$("#tin").mask("9999-9999999").val("11111111");
Chinmaya003
  • 474
  • 3
  • 10
0

phone Number field has limited to 11 using mask,and database field also has 11 length.but actually the phone number contains 12 chars(including -).so the phone number was not updating correctly.while populating it on phone field that was the problem

phpwomen
  • 3
  • 10