What would be the best approach to change specific characters in all text input fields of a form, on submit? When the form is submited I want "x" to be replaced with "y" and "0" with "1". I need to place this code inside the form validation script, so that it runs on submit.
So far, found this. Not quite what I need, besides I can't even make it work :)
var change_text = document.getElementById("mytextinput");
change_text = change_text.replace( /x/g, 'y' );
change_text = change_text.replace( /0/g, '1' );
// and so on for all text inputs...