I have a plugin using jQuery that modifies an input to give it a formatting mask when it is blurred, however I don’t want to send through the formatted value when the form is submitted.
Is there a way I can intercept the parent forms submit event, adjust the value of the element to remove the mask, and then continue the submit without having to define it for every form that uses an input with the plugin?
The other option of course is to use a hidden input and store the raw value in that, and use the unnamed input to display the mask, but I would like to avoid extra markup if I can (plus it would be a handy trick!)
1 Answer