Hi I want to use the Phone field to allow a user to type in their phone number. I am in the UK so I have to use the international type but it allows the user to type in letters.
Can this be changed so it checks for numbers?
Hi I want to use the Phone field to allow a user to type in their phone number. I am in the UK so I have to use the international type but it allows the user to type in letters.
Can this be changed so it checks for numbers?
Currently the phone field allows letters because in some countries letters represent numbers. Ex. 823-CALL-ME. So currently this isn't possible, although we may enhance it in the future with an option to force numerals only.
It would be great to limit inputs to only accept numerals. For now at least I can accomplish this with jQuery:
jQuery(document).ready(function($) {
$("#input_id").keydown(function(event) {
if ( event.keyCode == 46 || event.keyCode == 8 ) {
}
else {
if (event.keyCode < 48 || event.keyCode > 57 ) {
event.preventDefault();
}
}
});
});
the option would be great for now ill use the number field
I hope they will implement it, since it's almost just a c/p job ;)