Working With The Validation Text Field Widget - Adobe 38040334 - Dreamweaver CS3 User Manual

Pc
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Working with the Validation Text Field widget

About the Validation Text Field widget
A Spry Validation Text Field widget is a text field that displays valid or invalid states when the site visitor enters text.
For example, you can add a Validation Text Field widget to a form in which visitors type their e-mail addresses. If
they fail to type the "@" symbol and a period in the e-mail address, the widget returns a message stating that the
information the user entered is invalid.
The following example shows a Validation Text Field widget in various states:
A
B
C
D
A. Textfield widget, hint activated B. Textfield widget, valid state C. Textfield widget, invalid state D. Textfield widget, required state
The Validation Text Field widget includes a number of states (for example, valid, invalid, required value, and so on).
You can alter the properties of these states using the Property Inspector, depending on the desired validation results.
A Validation Text Field widget can validate at various points—for example, when the visitor clicks outside the widget,
when they type, or when they try to submit the form.
The widget state when the page loads in the browser, or when the user resets the form.
Initial state
The widget state when the user places the insertion point in the widget.
Focus state
The widget state when the user has entered information correctly, and the form can be submitted.
Valid state
The widget state when the user has entered text in an invalid format. (For example, 06 for a year instead
Invalid state
of 2006).
The widget state when the user has failed to enter required text in the text field.
Required state
Minimum Number Of Characters state
of characters required in the text field.
Maximum Number Of Characters state
number of characters allowed in the text field.
The widget state when the user has entered a value that is less than the value required by the
Minimum Value state
text field. (Applies to integer, real, and data type validations.)
The widget state when the user has entered a value that is greater than the maximum value
Maximum Value state
allowed by the text field. (Applies to integer, real, and data type validations.)
Whenever a Validation Text Field widget enters one of these states through user interaction, the Spry framework
logic applies a specific CSS class to the HTML container for the widget at run time. For example, if a user tries to
submit a form, but has entered no text in a required text field, Spry applies a class to the widget that causes it to
display the error message, "A value is required". The rules that control the style and display states of error messages
exist in the CSS file that accompanies the widget, SpryValidationTextField.css.
The widget state when the user has entered fewer than the minimum number
The widget state when the user has entered greater than the maximum
September 4, 2007
DREAMWEAVER CS3
464
User Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents