View Full Version : form submit/validation question

04-19-2010, 05:05 PM
I am a noob to DW and this forum.
I have a website with a form validation problem.
The form works fine, but I had no validation code in it.
I'm using DW CS3 behaviors to validate some fields (make them required) so I don't get blank forms submitted to me.
When I test my form, as I tab though the blank fields I get javascript errors like "contact name is required, email is required" etc:

But I can still click send and the form submits anyway.
I must be missing something but I don't know what. . . .


04-19-2010, 06:06 PM
Show your code.

04-19-2010, 06:22 PM
If you are using the Validate Form behavior in Dreamweaver, attach the behavior to the Submit button (not to the individual form fields). It should be triggered by the onClick event.

04-20-2010, 01:47 PM
Thanks DWCourse

That appears to have worked. I just used it with a test form file.
I'll try it on the real form and post back if I have more problems.

Thank you very much!

sh :)