Spry User Guide - Support - Adobe
Spry User Guide - Support - Adobe
Spry User Guide - Support - Adobe
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Change Validation Text Field widget background colors<br />
❖ To change the background colors of the Validation Text Field widget in various states, use the following table to<br />
locate the appropriate CSS rule, and then change the default background color values.<br />
Color to change Relevant CSS rule Relevant property to change<br />
Background color of<br />
widget in valid state<br />
Background color of<br />
widget in invalid state<br />
Background color of<br />
widget in focus<br />
.textfieldValidState input, input.textfieldValidState background-color: #B8F5B1;<br />
input.textfieldRequiredState, .textfieldRequiredState<br />
input, input.textfieldInvalidFormatState, .textfieldInvalidFormatState<br />
input, input.textfieldMinValueState,<br />
.textfieldMinValueState input, input.textfieldMaxValueState,<br />
.textfieldMaxValueState input,<br />
input.textfieldMinCharsState, .textfieldMin-<br />
CharsState input, input.textfieldMaxCharsState,<br />
.textfieldMaxCharsState input<br />
Specify custom patterns<br />
The following table shows a full list of values used for custom patterns.<br />
Use these values to create a custom pattern for any of the format types. For example, to specify a custom social<br />
security number that’s a combination of numbers and capital letters, specify the following custom pattern in the<br />
constructor’s third parameter:<br />
<br />
var textfieldwidget1 = new <strong>Spry</strong>.Widget.ValidationTextField("textfieldwidget1",<br />
"social_security_number", {format:"custom", pattern:"AA00AA"});<br />
<br />
The preceding code results in a text field that accepts values such as UT99CW, AB87PP, GV44RE, and so on.<br />
Note: Dreamweaver users need only enter a custom pattern in the Pattern text box of the Property inspector, using the<br />
values provided in the preceding table. For example, AA00AA.<br />
Note: <strong>Spry</strong>’s validation mechanism supports only ASCII characters.<br />
Insert autocomplete characters<br />
The following table shows a full list of values used for custom patterns.<br />
background-color: #FF9F9F;<br />
.textfieldFocusState input, input.textfieldFocusState background-color: #FFFFCC;<br />
Value Description<br />
"0" Whole numbers between 0 and 9<br />
"A" Uppercase alphabetic characters<br />
"a" Lowercase alphabetic characters<br />
"B"; "b" Case-insensitive alphabetic characters<br />
"X" Uppercase alpha-numeric characters<br />
"x" Lowercase alpha-numeric characters<br />
"Y"; "y" Case-insensitive alpha-numeric characters<br />
"?" Any character<br />
SPRY<br />
<strong>User</strong> <strong>Guide</strong><br />
63