Start learning with our library of video tutorials taught by experts. Get started

Creating a First Web Site with Dreamweaver CS6

Sending contact form content


From:

Creating a First Web Site with Dreamweaver CS6

with Paul Trani

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.

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Creating a First Web Site with Dreamweaver CS6
2h 48m Beginner Aug 30, 2012

Viewers: in countries Watching now:

Join author Paul Trani as he shows how to create a web site step by step with Adobe Dreamweaver CS6, one of the industry's leading web authoring tools. But not just any web site. A responsive HTML5 web site that works across multiple browsers and devices, complete with rich imagery and text, a robust portfolio, video content, and even a contact form. This course covers how to use web standards such as HTML5 for structure and Cascading Style Sheets (CSS) to control colors, fonts, navigation, and more. The course also demonstrates how to test across multiple browsers and devices and upload your new site to the web.

Topics include:
  • Understanding basic web principles
  • Adding content to a web page
  • Linking to web sites and email addresses
  • Styling content with CSS
  • Creating a layout that fits multiple browsers and devices
  • Building an HTML5 layout
  • Inserting images and video
  • Adding a menu bar
  • Creating a contact form
  • Integrating a Twitter feed
  • Uploading and testing a web site
Subjects:
Web Web Design
Software:
Dreamweaver
Author:
Paul Trani

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.

Find answers to the most frequently asked questions about Creating a First Web Site with Dreamweaver CS6.


Expand all | Collapse all
Please wait...
Q: Where do I learn more about how to make a website?
A: Discover more on this topic by visiting how to make a website on lynda.com.
Share a link to this course
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.
Upgrade now


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.

Upgrade now

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 preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



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.

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