beautypg.com

Specify when validation occurs, Display widget states in design view, Prohibit or allow blank values – Adobe Dreamweaver CS3 User Manual

Page 481: Specify an invalid value, Customize the validation select widget

background image

DREAMWEAVER CS3

User Guide

474

Specify when validation occurs

You can set the point at which validation occurs—when the user clicks outside the widget, as the user types, or when
the user tries to submit the form.

1

Select a Validation Select widget in the Document window.

2

In the Property inspector (Window > Properties) select the option that indicates when you want validation to

occur. You can select all of the options or none of them.

Blur

Validates whenever the user clicks outside the widget.

Change

Validates as the user makes selections.

Submit

Validates when the user tries to submit the form.

Display widget states in Design view

1

Select a Validation Select widget in the Document window.

2

In the Property inspector (Window > Properties), select the state you want to see from the Preview States pop-up

menu. For example, if you want to see the widget in its valid state, select Valid.

Prohibit or allow blank values

By default, all Validation Select widgets that you insert with Dreamweaver require that users select menu items that
are have an associated value when the widget is published on a web page. You can, however, disable this option.

1

Select a Validation Select widget in the Document window.

2

In the Property inspector (Window > Properties), select or deselect the Do Not Allow Blank Values option,

depending on your preference.

Specify an invalid value

You can specify a value that will register as invalid if the user selects a menu item that is associated with that value.
For example, if you specify -1 as an invalid value, and you assign the value to an option tag, the widget will return an
error message if the user selects that menu item.

1

Select a Validation Select widget in the Document window.

2

In the Property inspector (Window > Properties), enter a number to use as in invalid value in the Invalid Value box.

Customize the Validation Select widget

Although the Property inspector enables you to make simple edits to a Validation Select widget, it does not support
customized styling tasks. You can alter the CSS for the Validation Select widget so that you can create a widget that
is styled to your liking. For a more advanced list of styling tasks, see

www.adobe.com/go/learn_dw_spryselect_custom

.

All CSS rules in the topics below refer to the default rules located in the SpryValidationSelect.css file. Dreamweaver
saves the SpryValidationSelect.css file in the SpryAssets folder of your site whenever you create a Spry Validation
Select widget. Consulting this file is helpful because it contains commented information about various styles that
apply to the widget.

September 4, 2007