I’m doing a multi step form (form wizard) and I have splitted the form into 5 parts… so mi first div is like this:
<div class="data-1" style="display: block; ">
<h3>Data</h3>
<fieldset class="inputs">
<ol>
// 5 text inputs here
</ol>
</fieldset>
</div>
Via jquery I was trying to grab the 5 inputs of each div (the other divs has also checkboxes, radio buttons) by doing this
$(".data-1 :input").val();
in order to know the value of the inputs of each div… but it seems that I have to iterate over div inputs.
Is there a way I can prevent any empty input? or is there a plugin that do this?
Take a look at jQuery.Validate
http://docs.jquery.com/Plugins/Validation