Dreamweaver CS4 Resources
|
Insert and edit the Validation Radio Group widget
Insert the Validation Radio Group widget- Select Insert > Spry >
Spry Validation Radio Group.
- In the Name text box, enter a name for the radio group.
- Add or subtract radio buttons from the group by clicking
the plus (+) or minus (-) buttons.
- In the Label column, click the name of each radio button
to make the field editable, and assign unique names to each radio
button.
- In the Value column, click each value to make the field
editable, and assign a unique value to each radio button.
- (Optional) Click a radio button or its value to select
a specific row, and then click the up and down arrows to move the
row up or down.
- Select a layout type for the radio group.
- Line breaks
- Places each radio button on a separate line using line breaks
(br tags).
- Table
- Places each radio button on a separate line using individual
table rows (tr tags).
- Click OK.
Note: You can also insert a Radio Group widget by using
the Spry category in the Insert panel.
Specify when validation occursYou can set the point at which
validation occurs—when the user clicks outside the widget, as the
user makes selections, or when the user tries to submit the form.
- Select a Validation Radio Group widget in the
Document window by clicking its blue tab.
- 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 Submit only.
- Blur
- Validates whenever the user clicks outside the radio group.
- Change
- Validates as the user makes selections.
- Submit
- Validates when the user tries to submit the form. The submit
option is selected by default, and cannot be deselected.
Display widget states in Design view- Select a
Validation Radio Group widget in the Document window by clicking its
blue tab.
- In the Property inspector (Window > Properties),
select the state you want to see from the Preview States pop-up
menu. For example, select Initial to see the widget in its initial
state.
Change required status of radio buttonsBy default, Validation Radio Group
widgets require the user to make a selection before submitting the
form. You can, however, make selections optional for the user.
- Select a Validation Radio Group widget in the
Document window by clicking its blue tab.
- In the Property inspector (Window > Properties),
deselect the Required option.
Specify an empty or invalid valueYou can specify a value that registers
as empty or invalid if the user selects a radio button that is associated
with one of those values. If the user selects a radio button with
an empty value, the browser returns the error message “Please make a
selection.” If the user selects a radio button with an invalid value,
the browser returns the error message “Please select a valid value.”
 Radio Group widget with empty value radio button.
- Select the radio button in your Radio Group widget
that you want to use for the empty or invalid radio button. When
specifying empty or invalid values for the widget, there must be
corresponding radio buttons with those values already assigned.
- In the Radio Button Property inspector (Window >
Properties), assign the radio button a checked value. To create
a radio button with an empty value, type none in the Checked
Value text box. To create a radio button with an invalid value,
type invalid in the Checked Value text box.
- Select the entire Validation Radio Group widget by clicking
the widget’s blue tab.
- In the Property inspector, specify empty or invalid values.
To create a widget that displays the empty value error message “Please
make a selection,” type none in the Empty Value text box.
To create a widget that displays the invalid value error message
“Please select a valid value,” type invalid in the Invalid Value
text box.
Remember, both the radio button itself and the Radio Group
widget must have the none or invalid values assigned for the error
messages to display properly.
|