Menu
Hi,
I want to validate an HTML form, that have array filed names. For example
[code=php]
<INPUT TYPE=”TEXT” NAME=”contact[name]”>
<INPUT TYPE=”TEXT” NAME=”contact[email]”>
I need this as a program require contact us form in this format (sunshop).
I tried,
[code=php]
if(document.formname.contact[name].value.length==0) { alert(‘You must enter name’); return false; }
But not working.
You can see sample form at
[url]http://yujinboby.bizhat.com/javascript_validate_form_array.html
Can anyone tell me how to validate the form ?
Regards,
Yujin