PDA

View Full Version : form submit/validation question


snowhugger
04-19-2010, 04:05 PM
Hi
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. . . .

sh

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

DWcourse
04-19-2010, 05: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.

snowhugger
04-20-2010, 12: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 :)