Results 1 to 5 of 5
Aug 29, 2012, 05:25 #1
- Join Date
- Jul 2012
- 1 Post(s)
- 1 Thread(s)
Making conditions in jquery validator
JQuery Validate plugin is a good thing to control web-forms. I have learnt about it, but I want to make something extra.
Suppose, I have a <select> tag with a few options. If a user selects a specific one, another input field gets added and it's required on that circumstance.
But, I want to do, that field will only be required if the specific option is selected.
<select id="any" name="any"> <options>1</options> <options>2</options> <!-- make it specific --> <options>3</options> </select> <div id="hidden_f"> <label for="any" id="any">Type</label> <input type="text" id="any" name="any"> </div>
I have read the JQUERY Validate Doc, but it's not so friendly for newbies. So I think you can explain me a lot.
Thanks in advance....