Dreamweaver Tutorial - Create A Contact Form In Dreamweaver

Computers & TechnologyMultimedia

  • Author John Mellow
  • Published November 25, 2008
  • Word count 592

In this tutorial you will learn how to generate your all important Dreamweaver Contact Form & have the details of the form emailed straight to your INBOX. Capturing Contact Information of potential customers in important in the business world. Don't let those potential customers or clients disappear because you didn't have a Contact Form on your web-site. By following this Dreamweaver Tutorial you will have a WORKING Contact Form up & running in a few easy steps.

NOTE: Before they start you will want to download this PHP Form to Email Script & unzip it to the root directory of your web-site. Dowload the file from dreamweaverspot.com

Now you are ready to begin inserting the form & the fields you would like onto the page. In this example I am going to generate anew page, but you can easily add this to an existing page if you already have six in mind for the form to be placed on.

  1. In Dreamweaver, select File > New The New Document Dialog Box appears.

  2. In the Title text field in the Document toolbar, enter Contact Form to add a title to your document.

  3. In the Blank Document list, select HTML, then click generate to generate a new HTML document.

  4. Next they are going to Insert a Form onto the page, select Insert > Form then Form from the Flyout Menu. A Form dialog box will then open. In the Action text box type in FormtoEmail.php (this is the file you extracted to the root of your web-site earlier). Change the Method to POST & then in the NAME text box type in ContactForm.

  5. select File > Save, then save the document in your local site folder. Name it ContactForm.htm.

Repeat those steps & add another Label & Text Field & name it email.

  1. Next step is to place the form objects onto the page (the information they would like to collect). In this example I have placed a text box for Name & Email Address, & also a Text Area for Comments. To do this click inside your form object & then from the top menu select Insert > Form > Label. From the Code Window click in between the LABEL Tags & type in Name:. Next from the top menu again select Insert > Form > Text Field. Name the Text field name from the properties box at the bottom.

  2. Add a Button. Again from the top menu Insert > Form > Button. Your Form should now look like this: (note I have put each element on a different line to help with the usability).

  3. Add another Label & type in Comments. Then add a Text Area, go to Inset > Form > Text Area in the top menu. Name the Text Area comments from the Properties box at the bottom & give the Character Width a value of 50 & the Number of Lines a value of 10.

  4. Now they want to edit a couple of lines in the FormtoEmail.php file. Open the file in Dreamweaver. The first line you want to edit is the line that starts with $my_email.

Change the email address to the address you want the emails to be sent to. The other line that you may wish to change is this two:

  1. Upload both files to your web server & bingo all done. You should know have a working contact form.

This is where the visitor will be directed after they have pressed the SUBMIT button. If you've a page that you like to direct them to then place the location of the file in there, or basically leave it blank & they will get a thank you message on the same page.

A Fun, Fast And Simple Macromedia Dreamweaver Tutorial That Shows You How To Build Your Website, Step by Step From Start To Finish. Visit http://www.macromediadreamweavertutorial.com

Article source: https://articlebiz.com
This article has been viewed 1,141 times.

Rate article

Article comments

There are no posted comments.

Related articles