Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Sending contact form content

From: Creating a First Web Site with Dreamweaver CS6

Video: Sending contact form content

Adding forms to your website is done pretty easily using Dreamweaver. As you can see here on the contact page, I've added a couple of text fields right here, and even a text area component and a Submit button, ultimately making up this contact form. So you can add these components using Dreamweaver, but what happens when you hit that Submit button? Well, it needs to send that data to an email address, as it needs to send that data to a middleware page that does the processing.

Sending contact form content

Adding forms to your website is done pretty easily using Dreamweaver. As you can see here on the contact page, I've added a couple of text fields right here, and even a text area component and a Submit button, ultimately making up this contact form. So you can add these components using Dreamweaver, but what happens when you hit that Submit button? Well, it needs to send that data to an email address, as it needs to send that data to a middleware page that does the processing.

Usually it's a PHP page or a Perl script, and that middleware page is usually provided by your hosting company. So I'm going to go to my hosting company. It happens to be godaddy.com, not that I'm promoting them. I just want to point out what they have available to you. Under Tools, there is this Form Mail. So any form that is created on your site will send that data to this email address using GoDaddy. So that they make it really easy; just enter in your email, and that's good to go there.

So, check with your hosting company, see if they have some sort of form script available to you, and if they don't, I have actually provided a page for you, so you can also see what it looks like. So I'm going to go into Dreamweaver. Here, I'm in Dreamweaver. Here's my form. Everything is looking good. But I want to open up that page that I have provided in case you have access to the source files, formmail.php. I'm going to open up this page. Notice how you don't see anything because you need to click over to Code view, and you can see all of the code.

So in this case, this just provides a couple different options in here that will work out great for processing. Notice that as I scroll down, you have these three different lines that will send the name, email, and message to this email address--again the same one that was part of my GoDaddy site. Here's the subject line and then the header. We'll include the name and email, and then the body of the message will be the name, email, and comments being submitted.

So that's how that works. Also, there's a thank you page that it will return to. So, that's what I want to go ahead and implement are this form ultimately, but I need to point to it first. So I'm going to go to contact.html. Remember, this is an entire form, and that form is encapsulated right here by this red line. It shows me that form, and right down in here, I need to point to that specific page, evajonesdesign.com, and that is known as formmail.php.

Now keep in mind, this page, this formmail.php page, is already uploaded. With that in place, what's going to happen is--in fact, as I save this page, I can preview it in a browser, and we can test this out. My name, email address, hitting the Tab key, Love your site! clicking the Submit button. Let's see what's going to happen. Clicking on that.

Oh, it takes me to this thank you page. I am like, wait a minute. I don't have a thank you page. Well, you are right, because this is basically their 404 Error page that GoDaddy has. So I need to create a thankyou page. But let's click over to the evajonesdesigner email account and see if we've received that email. So clicking over into this Gmail account. And here I am in evajonesdesigner email. Right in here, I can click right here from EvaJonesDesign. Here's the message, Love your site! is really what I sent.

So hopefully, that's pretty straightforward. There are really only three fields in here: your Name, Email and Comments. You can see what it says. I can reply as Eva Jones if I want to. But that's how that works. Going back into Dreamweaver, what I need to do is I need to create that thank you page after you hit the Submit button. Because if I take a look at that formmail.php, you can see, right up here on line 5, it says hey, you know what, the refresh takes you to that thankyou.html. So I'm going to make that right now. Starting with the contact page, I'm going to do a Save As, and I'm going to save this as, you guessed it, thankyou, right there. And I need to delete this form as well as this other content, say right here instead of Let's connect, Thank you for contacting me, just a simple message just like that, eliminating that line too.

Now with that in place, I can save this page. So this page would need to be uploaded as well. Once this page is uploaded, I can go to my contact form. In fact, let's just preview this in a browser and try this one more time: your name, email address, message. When I click Submit, it's going to go to that thankyou.html page that is already uploaded.

So the uploading will actually happen in another step, but nonetheless, as you get into hosting, that's where I'll talk about that. But with that page uploaded, if I click Submit, it actually goes to that thank you page and sends that message as well. So that's how you deal with the processing of any form data and ultimately sending it to an email, either using what your hosting company provides or using that formmail.php, modifying it accordingly, and then uploading that to your site, as well as uploading a thank you page.

Show transcript

This video is part of

Image for Creating a First Web Site with Dreamweaver CS6
Creating a First Web Site with Dreamweaver CS6

30 video lessons · 42168 viewers

Paul Trani
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Creating a First Web Site with Dreamweaver CS6.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.