Aug 6th, 2009, 5:36 PM
Hi Alex,
Sure! The simplest way to do it would be to just add a pair of radio buttons like so:
Then add an "if:" clause to the beginning of all your JS validation rules that tell it to only run that validation if the validate field == "yes", (I'm assuming the name attribute of the radio buttons is "validate"), e.g.
Then, on the backend, you could do something similar: just check that the incoming $_POST["validate"] == "yes" and then run the rules.
Hope this helps a bit.
- Ben
Sure! The simplest way to do it would be to just add a pair of radio buttons like so:
Code:
Validate form? (x) Yes ( ) no
Then add an "if:" clause to the beginning of all your JS validation rules that tell it to only run that validation if the validate field == "yes", (I'm assuming the name attribute of the radio buttons is "validate"), e.g.
Code:
var rules = [];
rules.push("if:validate=yes,required,field1,Please fill in field 1.");
rules.push("if:validate=yes,required,field2,Please fill in field 2.");
...
Then, on the backend, you could do something similar: just check that the incoming $_POST["validate"] == "yes" and then run the rules.
Hope this helps a bit.
- Ben