logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 04-19-2010, 05:05 PM   #1
snowhugger
 
Join Date: Apr 2010
Location: Central-Vermont
Posts: 2
Default form submit/validation question

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
snowhugger is offline   Reply With Quote
Old 04-19-2010, 06:06 PM   #2
mangofreak
mangofreak's Avatar
 
Join Date: Jan 2006
Location: Toronto-Canada
Posts: 444
Default

Show your code.
__________________
J.
DW | FW | HTML | CSS | ASP | some PHP | Windows | Ubuntu
mangofreak is offline   Reply With Quote
Old 04-19-2010, 06:22 PM   #3
DWcourse
DWcourse's Avatar
 
Join Date: Apr 2009
Posts: 3,276
Default

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.
__________________
If my answer helped, check out DWcourse.com for Dreamweaver tips and tutorials.
DWcourse is offline   Reply With Quote
Old 04-20-2010, 01:47 PM   #4
snowhugger
 
Join Date: Apr 2010
Location: Central-Vermont
Posts: 2
Default Looks like that worked

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
snowhugger is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:27 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com