View Full Version : Broken validation on email form.

01-10-2012, 05:47 AM
I have been modifying this form:
to be part of an iPhone optimized site for the same client.

The modified form works, however it no longer stops emails being sent that do not have the required fields filled in.
The modified form is here:

The original is built using a table which I have removed and replaced with divs. Didn't think I'd left anything out which would matter but I guess I must have.

Please help, i don't really know any JavaScript except what I copy and paste.

01-10-2012, 03:17 PM
My knowledge of JS isn't greater than yours, but when viewing your source code it occured to me that you didn't validate by the dot (.) in the email address, only by the @. Try validating that too, with this model: http://www.w3schools.com/js/js_form_validation.asp.

You can also try the solution of an online form builder that handles the validation as well as the submitted data. My recommendation is 123ContactForm (http://www.123contactform.com), which I have used with very good results.