Welcome to WebmasterWorld Guest from 54.158.36.59

Forum Moderators: open

Message Too Old, No Replies

Creating "Required Fields" in Dreamweaver

How do you do this? Help

     
7:04 am on Dec 2, 2005 (gmt 0)

5+ Year Member



I am trying to figure out how to create a required field in Dreamweaver! My dreamweaver bible doesn't even explain this common function seen in many forms seen on web-pages. I would like to make the NAME and EMAIL address fields compulsory to fill in before the form can be submitted.

If anyone can help, would really appreciate this!

Thanks

Louise

7:16 am on Dec 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I can remember correctly, there is no DW function to do this. You can use several types of add-ons.

I personally use javascript.

Just search for javascript form validation

8:41 am on Dec 2, 2005 (gmt 0)

5+ Year Member



cool, thanks
10:31 am on Dec 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Louise,

How good is your knowledge of Javascript. If you just want to get on with having your form checked and don't want to have to hand code too much, I would suggest trying to find free DW extensions.

The one I can recommend can be found if you google for 'yaromat' - (mods: I have no affiliation with him).

Although JS form checking is good I would also advise to use server side checking (if you use a script to email you the form).

If you use matts script - again no affiliation ;-) - or any of its variations, you have a built-in facility fo check for required/mandatory fileds using the <input type="hidden" name="required" value="yourmandatoryfieds, separated, bycomas" />

The use of server-side checking is good because some people have javascript disabled so they might make a mistake but most importantly it will block some spiders/bot that could 'form-spam' you.

Hope this helps

[edited to fix some typos]

[edited by: le_gber at 10:33 am (utc) on Dec. 2, 2005]

10:31 am on Dec 2, 2005 (gmt 0)

WebmasterWorld Senior Member beedeedubbleu is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Dreamweaver can do this and it is quite straightforward. You can find details of how it is done by going to DW help menu and typing in "validate form action" (in quotes).
12:11 pm on Dec 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, as I use Matts Script,

<input type="hidden" name="required" value="yourmandatoryfieds, separated, bycomas" />

is all I need use.

6:25 pm on Dec 2, 2005 (gmt 0)

10+ Year Member



when in DW just click on your submit button once to select it, go to you behaviors panel(Window>Behaviors) select the + sign and choose Validate Form from the dropdown. Should be pretty easy after that.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month