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?
I think you want to use unmask
$("#myForm").submit(function() { $("#txtPhone").unmask(); });
Set removeMaskOnSubmit as true when you initialize the inputmask
$("#txtPhone").inputmask({removeMaskOnSubmit: true});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With