View Full Version : Need help with the Form to wizard script

09-04-2012, 01:52 PM
1) Script Title: :: jQuery Form to Form Wizard

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex16/formwizard.htm#validateoption

3) Describe problem: Validating textfields, radiobuttons and textareas goes well but i can't get the script to validate a select or a checkbox. What am i missing?

Thanks and regards,


09-04-2012, 06:51 PM
The script does validate checkboxes and select menus, but under the following circumstances:

1) For checkboxes, it will only look at a group of checkboxes- where multiple checkboxes all share the same name or id- to see if one is checked. If you're trying to validate whether a lone checkbox (one with a distinct name) is checked, the script currently doesn't do that.

2) For select menus, its definition of a filled out select menu is one that has an option selected and that the selected option has text defined between its tag. A single row select menu like the below will report the first option has selected without any user interaction at all, passing the script's validation test automatically:

<select id="hobbies">
<option>hobby 1</option>
<option>hobby 2</option>
<option>hobby 3</option>

For 1), you can use the below modified script to also check for long checkbox/radio buttons to see if they are checked. For 2), please verify first whether the issue you're having is in fact just an example of the above scenario with single row select menus.