Sep 23rd, 2013, 11:48 AM
Hi folks,
Making some progress, but have run into unexpected behavior. As stated before, choosing "0" "1" or "2" should then require the adjacent comment field to be required. I tried setting "range=0-2" in the following code and the error message was triggered on 3, 4, or 5. So I swapped the range to get the desired behavior. Looks like this:
Easy enough, but possibly highlights a bug in this range validation function, or am I missing something?
Moving on, I then tried to add this line:
which breaks the form and prints "process.php" to the browser window for any value, 0-5. Can anyone help me out with this problem?
Much appreciated,
Mark Harrison
Making some progress, but have run into unexpected behavior. As stated before, choosing "0" "1" or "2" should then require the adjacent comment field to be required. I tried setting "range=0-2" in the following code and the error message was triggered on 3, 4, or 5. So I swapped the range to get the desired behavior. Looks like this:
Code:
rules.push("required,element_9,Please select an Sportsmanship Rating.");
rules.push("range=3-5,element_9,Please enter a comment in the next field.");
Easy enough, but possibly highlights a bug in this range validation function, or am I missing something?
Moving on, I then tried to add this line:
Code:
rules.push("if:range=3-5,element_9,required,element_9B,Please enter an Sportsmanship Comment.");
which breaks the form and prints "process.php" to the browser window for any value, 0-5. Can anyone help me out with this problem?
Much appreciated,
Mark Harrison