Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now

Video: Types of form fields

I tend to find in classes that a lot of people even if they have been through HTML, and a full HTML class still may not have covered forms in too much detail. So what I want to do in this movie is go through the names of the different form fields and talk about why we might use one form field versus another. If you are already familiar with forms and all the various types of form fields, then this may just be review for you. But like I said, I tend to find a lot of people don't know this coming into creating the form from the back-end side of it. In other words, having to get a form working.
please wait ...
Watch the Online Video Course Dynamic Dreamweaver Websites: Creating and Validating Forms
3h 34m Intermediate May 19, 2011

Viewers: in countries Watching now:

Forms perform an essential function in modern websites, making it possible to gather information from users and validate that information. In this course, Adobe Certified Expert Candyce Mairs shows how to create forms to email user information and validate user data using various methods of form validation. These validation methods include client-side, server-side, and custom validation; CAPTCHA images; and Spry validation fields. You'll also see how to set up a PHP testing environment and preview PHP pages in Dreamweaver. Along the way you'll build your skills in areas like using admin consoles, commenting code, working with variables and includes, and much more.

Topics include:
  • Installing XAMPP on a Windows system
  • Installing MAMP on a Mac system
  • Using admin consoles
  • Creating PHP pages
  • Commenting code
  • Working with web forms
  • Adding custom validation
  • Using redirects
  • Dealing with email issues
Subjects:
Developer Web video2brain
Software:
Dreamweaver
Author:
Candyce Mairs

Types of form fields

I tend to find in classes that a lot of people even if they have been through HTML, and a full HTML class still may not have covered forms in too much detail. So what I want to do in this movie is go through the names of the different form fields and talk about why we might use one form field versus another. If you are already familiar with forms and all the various types of form fields, then this may just be review for you. But like I said, I tend to find a lot of people don't know this coming into creating the form from the back-end side of it. In other words, having to get a form working.

So let's take a look at the different types of form fields. Now, what I have done is simply opened up the contactus.php page from our website. So within Dreamweaver, I just chose contactus.php and previewed it in the browser by clicking this button, Preview in Firefox, or whichever browser you have listed in that drop down. Please do not feel like you have to use Firefox for this course. You can use your browser of choice.

So, here is our Contact Us form for Scuba Vacations. Let's take a look at these different form fields and talk about the differences between them. So what I have here is the name and e-mail field. And these are known as text fields. I can control the length of these text fields. In other words, how long it is visually to a user. I can also control how many characters can go inside these boxes.

Just because my box is this long, does not mean that's where my characters automatically stop. So, I have to put, in the form field, how many characters I want the user to be able to enter. Text fields such as these two allow you to control that length. This next one is a drop down menu, or some people call this a select box. The term select box comes from the HTML coding side of things where you're using the HTML tag called Select to create this menu.

Right now, we have five items available. I, as a user, can only choose one of these at a time. So, when they're going to Contact Us at Scuba Vacations. They choose one of these choices only, not multiple. There is a way to set up this menu, so you can choose multiple topics in a drop down menu. Our form is not set up that way. If you use the ability to work with multiple items in a drop down menu, there is some extra programming you need to do on your Script side, in order to accommodate that.

And since most drop down menus are just one choice for the user, that's what we're covering this course. So, these are text fields. This is a drop down menu, or at least that's how I will reference it. Here, we have radio buttons. The idea behind a radio button is the user is only able to choose one of the options. In other words, if I chose yes, no will be blanked out. If I switch to no, yes is blanked out. Radio buttons get their name from, just like a regular radio in the car, if you push on a radio station, you can only listen to one radio station at a time. That's literally where they got their name, radio button. Scheduled tour date This is a check box, and you can see there's a little check inside of it by default in HTML.

What a check box allows you to do is check multiple items. Now, this may not be the ideal situation, but this is set up in check boxes instead of radio buttons for a tour date, because we don't want to assume a user will only use one tour versus multiple. So hopefully, Scuba Vacations as a scuba diving tour company, has people signing up for more than one vacation in their lifetime.

So they may be able to have a tour over 60 days from now, at the same time, they have one coming up within 30 days. If we want to give the user more than one choice within a form, it's always going to be a check box. So, radio button, one choice. A drop down menu, you can do these in two different ways. This one is a single choice drop down menu. Check boxes allow multiple. And this big area here is known as a text area. It's a little bit different from a text field up above. In a text area, you cannot limit the number of characters the user could type in here.

So I can limit on a single line text field. But within this area, I have to program within my server-side script, a check to make sure the number of characters is not too many. In other words, I could write an entire book in this comments area and it would just keep going. Now, that's in basic HTML. A text area will allow whatever characters the user wants to put in. So if we want to prevent that, we have to do some programming from our end to stop that, and this last piece is a Submit button.

Without a button, specifically a Submit button, nothing is going to happen. Now, in older forms, when the web first started, we used to have a Reset button set up here as well. I tend to kind of pull people coming through my classes, and over the years, that Reset button has kind of diminished. Forms have gotten longer and longer on the web. And because of that, if a user accidentally clicks that Reset button, it wipes out all the form information that they just spent a half an hour filling in.

So users have gotten annoyed by the Reset button, but it's totally up to you if you want to provide one or not. We at Scuba Vacations have decided not to include a Reset button, so we just have our Submit button. And I could click this a million times if I wanted to. Right now, if I click that, notice I'm taken to the Contact Us action page and everything stops. That's because we have to build this action page, and then we also need to, from this action page, send the user to another page, which I call the Thank You page.

Because usually on that page you're going to thank them for submitting the form, and then give them some additional information beyond just the thank you. So those are the different types of forum fields, and we're going to look at different ways to create them including working with spry validation fields that look very similar, but they have some features built in to them that are pretty cool. We'll also look at blocking this. So when I click this button, nothing will happen until the user has filled information out correctly.

So those are the various types of form fields with an HTML form.

There are currently no FAQs about Dynamic Dreamweaver Websites: Creating and Validating Forms.

 
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

* Estimated file size

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

Upgrade to View Courses Offline

login

With our new Desktop App, Annual Premium Members can download courses for Internet-free viewing.

Upgrade Now

After upgrading, download Desktop App Here.

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 ?

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:

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.

Start your FREE 10-day trial

Begin learning software, business, and creative skills—anytime,
anywhere—with video instruction from recognized industry experts.
lynda.com provides
Unlimited access to over 4,000 courses—more than 100,000 video tutorials
Expert-led instruction
On-the-go learning. Watch from your computer, tablet, or mobile device. Switch back and forth as you choose.
Start Your FREE Trial Now
 

A trusted source for knowledge.

 

We provide training to more than 4 million people, and our members tell us that lynda.com helps them stay ahead of software updates, pick up brand-new skills, switch careers, land promotions, and explore new hobbies. What can we help you do?

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.