Aug 26th, 2011, 4:35 AM
I have 3 separate radio buttons in my form with possible answers of "yes" or "no". I would like to make a text field required only if one or more of the radio buttons has been set to "yes" but I can't seem to figure out how to do that. This is what I tried so far but it's not working:
The conditional validation works fine for a simple if condition but what is the syntax for more complex logic like this? Or would I be better off with a separate function?
Thanks.
Code:
rules.push("if:c1_allergies=yes||c1_medical=yes||c1_medications=yes,required,Please provide medical details.");
The conditional validation works fine for a simple if condition but what is the syntax for more complex logic like this? Or would I be better off with a separate function?
Thanks.