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

Creating a First Web Site with Dreamweaver CS6

Adding input fields


From:

Creating a First Web Site with Dreamweaver CS6

with Paul Trani

Video: Adding input fields

Now the web is great because it allows me to communicate to the world, to get my message out there, but what if people need to contact me? Well, it is a two-way medium. Yhat's why I have the contact page open, because what I need to do here is go beyond just a link. So this actually will link out to this email address, but it launches the default email client, whatever they have on their machine. But what I want to implement is a form field--in fact, basically the ability to fill out a form and send me a message. Name, email, and the message, as well the Submit button.

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

Adding input fields

Now the web is great because it allows me to communicate to the world, to get my message out there, but what if people need to contact me? Well, it is a two-way medium. Yhat's why I have the contact page open, because what I need to do here is go beyond just a link. So this actually will link out to this email address, but it launches the default email client, whatever they have on their machine. But what I want to implement is a form field--in fact, basically the ability to fill out a form and send me a message. Name, email, and the message, as well the Submit button.

So I'm going to close Safari, I'm going to go into my contact page, and then I'm going to delete those lines, just like that. And I'm going to go to the Insert panel, and I'm going to change that to Forms, okay. So that's what I have up. And I need to implement a Name field. That's going to be a text field. Well, there is actually a couple in here. And notice right up here near the top there's this Text Field, but as I scroll down I want to use this Spry Validation Text Field because this has additional functionality I could take advantage of.

So with my cursor right there, I can select Spry Validation Text Field, and I can go ahead and give it an ID. And in this case, it's going to be, you guessed it, Name. I'm going to leave everything else as is. Okay, you don't need to worry about any of that. You don't even need to worry about the label because I'm going to show you what you can do with the label. So, selecting OK, this is a message you'll get. It says, hey, do you want to add a form tag? And a form tag is just a tag that will encompass all of the different form fields and allow you to submit all of that information to wherever you want to send it.

So you do want to say yes here. And that form field is actually this red line. But this is my Spry Text Field that I've added. So I can select it. Now, the first thing I'm going to do is change the name of it. It says Spry Text Field over here. I'm going to get rid of that one, and I'm just going to call this--in fact I'm going to name this the nameTextField, okay, just like that. With that selected, I can take a look at all these different options I have because it's a Spry Validation Text Field.

So again, right down here I can add a hint, and this will be your name. As I enter that in, that's actually what will appear right in here. And I can always check that by clicking Live view. So there you can see that's exactly what I want, nice and efficient. I can have a minimum number of characters, a maximum number of characters, if I want to as well, but this is what I like. This Preview states is going to be required information. In fact, on Blur, so when you deselect it, I want it to say, hey you know what, a value is required, because you have to enter in your name if you want to be contacted back.

That's the whole idea, allow them to enter in their name and make it required, and that's what we need to do. I'm going to place my cursor over here and just hit Enter, because for my next field I'm going to add a Spry Validation Text Field. And in this case it's going to be email. That's the ID. I'm going to leave everything else alone. Nice and easy. Selecting that, changing this to emailTextField, like that. And as I select it I can give it a hint, Your Email--not your friend's email but your email.

And required on Blur, this is a required item as well. In this case, in the case of an email, I want to make sure they submit a valid email, so I'm going to change the Type to Email Address, okay. So that's going to recognize whether they have @ symbol and a period. Next up, hitting Return after I put my cursor on the end here, and now I need to implement a text area, okay. So selecting that, the ID is going to be message, selecting OK. Scrolling down, you can see it right here, and I want this to be a messageTextArea.

All right, so selecting that, I can take a look, and I can say hey you know what, minimum number of characters is one, maximum number of characters maybe like 500. Okay, not too many, but about 500. I don't need to get a long book delivered through this emailTextField. Nonetheless what I can do is I can include a counter, which I really like. I can say since I'm requiring a minimum of one but really a maximum of 500, I can say you know, what counts the characters remaining.

So I'll show you what that looks like. As far as validation, I want to validate it on Blur, just like I've been doing. I'd say that looks good. Even the hint might be Your Message. With all of that in place, in fact, I'm going to save this page now, and look what gets added, all these dependent files for text fields, text areas. That's good. Clicking Live view, you can see as I scroll down how this is set up. So I can type in your name, so right there. Well, let's click off to Your Email, so I'm actually going to come mess this up.

I'm going to do the @ sign but I'm not going to put a period, and as I defocus it, or blur it, it says hey you know what, this is an invalid format. So I'll type in the correct one and blur it, which means you know defocus that, and you can see that they're green, green means go. Right in here, I love your site, a couple of exclamation points. As I do that, you can see that character count right down here, change. Hey, why not add a couple extra exclamation points. I can click off of that as well.

This looks good. The last thing I'm going to do is I'm going to go ahead and add a Submit button. So I'm going to turn off Live view and just after that last element of that text area, I'm going to add a button. So right here I'm going to insert a button. ID again is going to be Submit. Select that, type that in. There is my Submit button. I can see, overall, everything looks pretty good. I like how this looks. It's actually going to work pretty well. And really, the next step with this form is to go ahead and actually implement the functionality, when you hit Submit, have it submit the data and even go to 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