Radio buttons provide a way
to present users with a number of mutually exclusive choices. Users
can toggle the state of any radio button in a group between on and
off. When the radio button is selected, its state is On and its
value is registered. When the radio button is cleared, its state
is Off and its value is not registered. Only one radio button object
in a group can be in the On state.
You can make a radio button look like a check
box by setting its appearance characteristics in the Field tab of
the Object palette. Before doing so, however, consider the expectations
of users with respect to the behavior of check boxes. Do they expect
check boxes to provide multiple choices? If so, you should maintain
the standard and not apply radio button functionality to check box
images.
After you add a radio button to the form design, you can edit
the caption text and manipulate the object’s properties in the Field,
Value, and Binding tabs of the Object palette. You can define these
properties:
Radio buttons support scripting and calculations. If a user is
to supply data, you can define whether the input is recommended
or required, and you can set up messages to prompt users appropriately.
User input may be validated through scripting.
An
exclusion group
is a group of radio buttons. Only one
radio button in the exclusion group can be selected at a time.
You can work with an exclusion group as one object. Some options
on the Object palette apply to all of the radio buttons in the same
exclusion group. You can move radio buttons between exclusion groups
and create new exclusion groups. If you have several radio buttons
that are part of the same exclusion group, you can easily break
some of the objects out into another exclusion group.
When you add a new radio button to the form, if the last object
you added to the same subform was also a radio button, the new button
will be part of the same exclusion group. If the last object you
added was not a radio button, the radio button will create a new
exclusion group.
Exclusion groups automatically resize to fit all of the radio
buttons within the group. If you drag a radio button to an empty
area of the page, the exclusion group will expand to contain the
radio button. If you manually resize the exclusion group, all of
the contained radio buttons will be resized accordingly.
To set the size for a radio button
-
In the Object palette, click the Field tab.
-
In the Size box, type a different value (in points) and press
Enter.
Depending on the size you enter, you may have to resize
the radio button.
To specify the radio button style
-
In the Object palette, click the Field tab.
-
Select an option in the Button Style list:
-
To set the check style to the default, which is a filled
circle, select Default.
-
To set the button style to a check mark, select Check.
-
To set the button style to a circle, select Circle.
-
To set the button style to a cross, select Cross.
-
To set the button style to a diamond, select Diamond.
-
To set the button style to a square, select Square.
-
To set the button style to a start, select Star.
To assign On values to radio buttons
Each radio button
in an exclusion group is associated with an On value that represents
the selected radio button in the form data. You can change these
values, for example, to match existing values in a data source.
When you specify On values, the default values are integer values
starting with “1” for the first radio button in the exclusion group
that was added to the form. If you deselect the Specify Item Values
option, the On values will match the radio button caption text.
-
Select the exclusion group or one of the radio buttons
within the group.
-
In the Object palette, click the Binding tab and select Specify
Item Values.
-
Double-click the first On value that you want to change.
-
Type the new On value.
-
Press Enter to change the next On value or double-click any
other On value to change it.
To define custom data-binding properties for radio buttons
Binding options enable you
to build a form that captures data for enterprise infrastructures
and/or use an external data source to populate a form at run time. Set
data-binding properties for radio buttons in the Binding tab of
the Object palette.
-
Select the group.
-
Enable the form to connect to the data source when the form
is opened.
-
Bind the exclusion group to its corresponding data node.
For information about how to bind objects to a data source, see
Binding fields to a data source
.
To create a new exclusion group
-
Select the radio buttons that you
want to make part of a separate exclusion group in the Layout Editor
or the Hierarchy palette.
-
Do one of the following actions:
-
Right-click
one of the selected objects in the Layout Editor and select Wrap In
New Radio Button Group.
-
Right-click one of the selected objects in the Hierarchy
palette and select Wrap In New Radio Button Group.
Note:
After you add a group of radio buttons, add a
different object to the page. (For example, add a text object.)
Now, any new radio buttons you add to the form design start a new
exclusion group.
To move a radio button to a different exclusion group
-
Select
the radio button that you want to move to a different exclusion
group in the Layout Editor or the Hierarchy palette.
-
Do one of the following actions:
-
To move the
radio button on the form, drag the object in the Layout Editor to
a position within the borders of another exclusion group.
-
To change exclusion groups without moving the button on the
page, drag the radio button to another exclusion group in the Hierarchy
palette.
To move an exclusion group
-
Click the border of the exclusion group to
select it.
-
Drag the group to a new position on the page. All of the
radio buttons in the group will move together.
To merge exclusion groups
-
Click the border of the exclusion groups
to select them.
-
Select Layout > Merge Radio Button Groups.
To define the behavior of the exclusion group
-
In
the Object palette, click the Value tab and, in the Type list, select
one of these options:
-
To allow users to choose whether
to enter data, select User Entered - Optional.
-
To prompt users to enter data and make the field recommended,
select User Entered - Recommended and type a custom message in the
Empty Message box.
-
To prompt users to enter data and make the field required,
select User Entered - Required and type a custom message in the
Empty Message box.
-
To make the field read only and display a data value that
is calculated and displayed through an attached script, select Calculated
- Read Only. Users cannot edit the calculated value.
-
To make the field editable and display a data value that
is calculated and displayed through an attached script, select Calculated
- User Can Override. Users can edit the value if the calculation
script has been written to accept the input. If a user does edit
the calculated value, the custom message you specify in the Override
Message box appears.
-
To make the field read only and display a data value that
is merged or calculated and displayed at run time, select Read Only.
Users cannot edit the value.
-
If the value is recommended or required, type a prompt in
the Empty Message box.
-
If the value will be calculated, attach the calculation script
to the object by using the Script Editor.
-
(Optional) If a calculated value can be overridden, type
a message in the Override Message box.
To specify the default selection for the exclusion group
-
In the Object palette, click the Value tab.
-
In the Default list, select the value that identifies the
radio button that you want to set to the On state.
Note:
The Default list is available only when the
Type option is set to User Entered or Read Only. The value of a
radio button’s On state can be changed in the Binding tab.
|
|
|