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.
Now, it says please enter an email address. If I put two characters or so in the email address, it says, please enter a valid email address. Now, this piece is not specifically testing and being real picky about the e-mail address. As I said, this is a topic that we could talk about for a long time, this is very simple. It's testing the number of characters in the email address, so I'll put in a correct email address. Let's put example in here.
Now, the first thing that's going to happen, is this is our form this is the name field on the form. In other words, that text box called name, where the user would put in their name. This is what represents whatever the user typed in to that box. And we're going to test the length of whatever the user put into that box. If its less than 1 meaning if it's 0, they didn't enter anything in that box. We're going to get a message that says please enter your name.
Once that box pops up and the user clicks Okay, it's going to put the users cursor back in that name field and let our form know do not submit, return false, don't submit the form. This next one is simply testing to see if there's an empty inside that same value area. So these are almost double checking one another, please enter your name. Focus goes back in the name field. Now, we have a similar thing going on that we just looked at with the email. So, it's going to test and see if it's empty.
If so, we're going to get a, please enter an email address. This is going to test for how many characters are in the box. And this is the one where we got, please enter a valid email address, because I put less than 5 characters into the form field for email. So, this is the email address and that's all we have set up on our form. The comments area is not going to be required. If we wanted it to be required, we could use these same if statements.
There are currently no FAQs about Dynamic Dreamweaver Websites: Creating and Validating Forms.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
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.