Hi
Can anyone tell me how to validate a form where there are several different form elements of which I want to have a "cannot be empty" validation on groups of form fields.
e.g.
f a user enters information into one field (say name in a text field) I want to make sure they fill in certain other related fields for example age and address but dont want to enforce the validation on all of my fields in the rest of the form.
<form method="post" action="nextpage.htm">
<input type="text" name="username">
<input type="text" name="useradd">
<input type="text" name="useradd">
<!-- the 3 above to be related in validation if one is filled in then all 3 must but not 2 below-->
<input type="text" name="driver">
<input type="text" name="carmake">
<!-- the 2 above to be related in validation if one is filled in then other must but not first 3-->
</form>
Any ideas?
Thanks,
Crusader...
Can anyone tell me how to validate a form where there are several different form elements of which I want to have a "cannot be empty" validation on groups of form fields.
e.g.
f a user enters information into one field (say name in a text field) I want to make sure they fill in certain other related fields for example age and address but dont want to enforce the validation on all of my fields in the rest of the form.
<form method="post" action="nextpage.htm">
<input type="text" name="username">
<input type="text" name="useradd">
<input type="text" name="useradd">
<!-- the 3 above to be related in validation if one is filled in then all 3 must but not 2 below-->
<input type="text" name="driver">
<input type="text" name="carmake">
<!-- the 2 above to be related in validation if one is filled in then other must but not first 3-->
</form>
Any ideas?
Thanks,
Crusader...