Hi,
I have been trying to validate this form in Topics .
Can some one help me with this form ?
http://www.brooomsticks.net/form_tag/form.zip
Hi,
I have been trying to validate this form in Topics .
Can some one help me with this form ?
http://www.brooomsticks.net/form_tag/form.zip
Can you tell us a bit about the problem you're having getting it to work? You should be able to model it after the contact us form topic, we do some validation in there.
Or, you can add a javascript function within your <div> tag that looks something like this:
Code:<script type="text/javascript"> function CheckFields() { var ergx = new RegExp(''\w+([-+.'']w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*''); if(document.getElementById("MailName").value == "" || document.getElementById("MailPhone").value == "" || document.getElementById("MailEmail").value == "" || document.getElementById("MailSubject").value == "" || document.getElementById("MailMessage").value == "") { alert("Please complete entries."); return false; } if(!ergx.test(document.getElementById("MailEmail").value)) { alert("Invalid Email."); return false; } } </script>
validation is working. how do i validate dropdown and radio buttons .
i am using this code on submit button:
<INPUT onclick="MM_validateForm('Name','','R','LastName', '','R','CompanyName','','R','EMail','','RisEmail', 'Address','','R','EnquiryMessage','','R');return document.MM_returnValue" value=Submit type=submit name=B1>