How to Remove Unwanted Formatting from Your Website
How to Apply CSS3 Effects and Transforms in Dreamweaver
Preview HTML Documents on a Cellphone, Tablet, or Laptop in Dreamweaver

How to Validate and Confirm Passwords in Dreamweaver

Dreamweaver CS6 tools for collecting and conforming passwords work like this: First you create a password field using a Spry Validation widget, and then you create a confirm field using a Spry Validation widget.

Of course, to create these, or any form fields, your insertion point must be inside a form. With that all in place, follow these steps to create a password/password-confirm form field set:

1

Choose Insert→Form→Spry Validation Password.

The Input Tag Accessibility Attributes dialog box opens.

2

Enter a form field name in the ID field.

For example, use “password.”

3

Enter a descriptive label that tells people what to put in the Label field.

For example, “Enter a six-digit or more password here.”

4

Click OK and define any necessary form field attributes in the Properties Inspector.

For example, you might define a width and/or a maximum number of characters a user can enter (in the Char Width or Max Chars boxes, respectively).

5

Click the aqua label above the form field to define validation criteria.

For example, you might make this field required, and require a minimum of six characters.

6

Create the confirmation field by choosing Insert→Form→Spry Validation Confirm.

You can use the same techniques you used to define the password field to define the confirm field. But because whatever is entered in the confirm form field has to match what was entered in the password field, the only really necessary parameters here are an ID (say, “confirm”) and label (“Type your password again.”).

7

Test your validation fields by saving your page, and all the generated JavaScript, and then previewing in a browser.

Try “breaking the rules” you defined to test your validation scripts.

For example, you can try entering an e-mail address with only three characters. Or, an e-mail address without an “@” symbol. Or, an e-mail address with no “.” (dot) in it. The validation script will reject all these entries.

blog comments powered by Disqus
How to Edit New Pages with Dreamweaver
Create a New Style Sheet in the CSS Styles Panel
CSS Code Hinting in Dreamweaver
How to Create a Media Query in Dreamweaver
How to Add a DOCTYPE in Dreamweaver
Advertisement

Inside Dummies.com