Here, the files copied to
the local root that need to be posted online are SpryValidationTextField.css and
SpryValidationTextField.js.
After you??™ve set the validation options for the text field, you can customize the various states. The Spry
Validation Text Field widget offers up to four different states:
n Initial: The default state of the text field; if a Hint has been specified, it is shown within the text
field in the Initial state.
n Required: Displays an error message if no value has been entered into field when validated.
n Invalid Format: Displays an error message if an invalid value has been entered into field when
validated.
n Valid: Shown when the entry has passed validation.
To switch from one state to another, choose a different entry from the Preview States list in the Property
inspector. When you do, Design view changes to reveal or hide the possible error messages and CSS
stylings. You can easily modify any displayed message, as shown in Figure 18-16.
FIGURE 18-16
Customize your error messages by first changing the Preview State.
It??™s just as easy to customize the CSS for any portion of the validated form field like the border around
the error message or the background color of the valid entry. Simply switch to the desired state, select
the element you want to re-style and choose the CSS button in the Property inspector.
Pages:
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108