Hi kbwood.au,
Those addMethods have been a great help.
I have a similiar problem as panther89 . I would appreciate your help/insight with the issue.
How do I make one element required based upon a dropdown list's selected value?
ex:
- <td><label for="books"><b>Books and Titles</b></label></td>
<td><select name="books[ ]">
<option selected style="color:red;" value=" ">Choose One</option>
<option value ="jquery">jQuery</option>
<option value ="php">PHP</option>
<option value ="perl">Perl</option>
<option value ="other">Other - please specify name</option>
</select>
</td></td><td><input type="text" size="60" name="otherbook[ ]"/></td>
If "Other - please specify name" is selected, then the input with name "otherbook[ ]" must be required. I can't figure out how to do this.
I tried as below but it does not work:
- "otherbook[]": {
required: function(){
return $("#books option:selected").text()=="other";
I just can't figure out how to do this.
Appreciate your help and thanks in advance.