this question has already been asked but the solutions where not clear.
Im using Josh Bush's MaskedInput plugin for jQuery
What im trying to achieve is:
E.g: a phone input with the mask
$("#txtPhone").mask("(99)9999-9999");
EQUALS: (00)9398-8373
i want it to submit : 0093988373
------ Is it possible to remove the .mask on submit but keep the value?
You can also extract the raw value on a masked input using
Source : https://github.com/digitalBush/jquery.maskedinput/issues/318
Example
If you use a
phone
input with such a mask :you can extract the user input using :
unmask is not a function. This is my way of use. autoUnmask: true
I think you want to use
unmask
Set removeMaskOnSubmit as true when you initialize the inputmask
Assuming you have more than just one input being submitted, you could use:
where FormObj is your form object id, such as #form.
Based on Plugin Site: