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

Building the action page

From: Dynamic Dreamweaver Websites: Creating and Validating Forms

Video: Building the action page

We have now reached the final version of our form. The moment you've all been waiting for. Let's open up, contact us dash final. This is the final version of our form. This particular version of the form is not using a recaptcha image. I showed you how to do that earlier in this course, but our final version we've decided not to use a recaptcha. This final version does have Java script attached to the form for client side validation using Dream Weaver beavhiors. This form does have server side validation.

Building the action page

We have now reached the final version of our form. The moment you've all been waiting for. Let's open up, contact us dash final. This is the final version of our form. This particular version of the form is not using a recaptcha image. I showed you how to do that earlier in this course, but our final version we've decided not to use a recaptcha. This final version does have Java script attached to the form for client side validation using Dream Weaver beavhiors. This form does have server side validation.

It's the same server side validation that was looked at in the server side validation piece for the contact us form. So the server side validation is identical to what's in this file. Server validate does not add the email piece. So this final version, does add the email piece. Now, this will not work, if you preview it in the browser, it will not send an email.

In your local host environment, we do not have the entire email setup, within Apache, the SMTP portion configured. And even if we did, in a local host environment, most of the time you cannot get an email to work correctly. So in order to actually have this form send an email, what you want to do is put this Contact us final onto a live web server.

That does have SMTP configured within it. But let's take a look at this form. Now up at the top of this page, I do have a note. This page is live. It's out on my website, so you can go out to this hyperlink and preview this page on a live server. You will not be the one to get the email however, I put an identical version of this page on my website so you can see how it works.

But I will be the one to get the email once it's out of my site at this link, if you are using this version. Feel free to take this contact us final. You will need some additional files in order to preview it correctly, including the images on your website. But this particular version is identical to the one on my site. So, up at the top, this is our server side validation being built. This is the exact same Server Side Validation, as in Server Validate, the piece that is different, begins on line 58.

Within this section, we have an email message being built. And let me close up my Insert bar, up at the top, so I have a little more room here. So if this a valid form, if it passes our server side validation piece, this is where the email will be sent. So in your version you'd want to put your email address here. I told you I have an identical form on my website, so I needed to put in email addresses.

Here's the subject of the form. So when that email comes into me, that will be in the subject line. The dollar message part is actually building the email message portion. So you can see it has a subject. The form name is plugged in. This is coming from a hidden form field, in the form, ad then we have what the user plugged in, so we have their name, email, topic, present customer, tour date, and if they filled in the comments area we will get the comments inlcuded in our email.

The headers portion is listing who this is from. It's also CCing another email address. I wanted to show you how to add this piece in case you need to do it. And line 92 is actually sending the email to the web servers. SMTP server if it is set up. PHP does not actually send the email that web server does. So PHP gathers all this information up and forwards it to the mail transport agent for the web server. Once the user has filled out the form they will be redirected to this particular page, you can see within the scope of that folder on my website, we have the thank you page.

Since you can go out to my website to fill out this form, I wanted to make sure you were redirected when you did to a nice looking thank you page, and then the entire process is exited. So that is what sends our email. Here is our client-side validation. This is built by Dreamweaver behaviors. I'm not using the custom client-side. Here is our actual form. And if I put it InDesign view. It's the exact same form, we looked at in the server side validation piece. If I preview this in the browser, you will see, there's our form. If I click summit, the server side validation will work just fine within your local enviroment.

It's just the actual email Well not get sent out by the web server in this local environment, so if I plug in my name, click submit, name is gone, you can see it turns black once again, and email. If I plug in a good email address and click Submit, we are all set. Add a topic that one disappears. So you can see as we fill these out correctly. Now what if I supply an email address such as this you can see it is not a valid email address. So, you'll have a completely functional form in this version. called Contact us-final, this file is only located within the chapter seven Start files, within your Course files.

Chapter seven is a more complete folder of files, so if for some reason you do not have this one, you want to replace your files with the chapter seven start files. And then retest this page. So that is our final form, complete with client side validation, server side validation and an email script that will sent the email to whoever you specify to send it too. Isn't it amazing how much work it is to put together a single form for a website.

Most people in my classes are amazed at how much work it is. And once you understand that, you tend to be a little less critical of forms out on the web. But they are a part of every website. It's the easiest way to gather data from the user and when you use a form, the web server is spending the information so the user can fill out that form, whether they are on their own machine or whether they are traveling and using somebody else's machine.

So that is a web form, and how to send a webform and it's data in an email out to get our information from a user.

Show transcript

This video is part of

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 Dynamic Dreamweaver Websites: Creating and Validating Forms.

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.