Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Insert a group of option

buttons
The procedure for inserting a group of option buttons
differs slightly depending on whether you are
designing a new, blank form template or basing the
design of your form template on a database or other
external data source.

The following illustration shows how an option button


looks when you select it in design mode.

Controls can be bound or unbound. When a control is


bound, it is connected to a field or group in the data
source so that data entered into the control is saved in
the underlying form (.xml) file. When a control is
unbound, it is not connected to a field or group, and
data entered into the control is not saved. When you
select or move your pointer over a control, text and a
binding icon appear in the upper-right corner of the
control. The text indicates the group or field to which
the control is bound in the data source. The icon
indicates whether the control is correctly bound to that
group or field. When the binding is correct, a green
icon appears. If there's something wrong with the
binding, you'll see a blue or red icon instead.

The data source for the form template consists of fields


and groups that appear in a hierarchical view in
the Data Source task pane. Each option button is
bound to the same field in the data source. When a
user clicks an option button, the value that is associated
with that option button is stored in the field. In the
following example, the 1, 2, 3, and n/a option buttons
are all bound to the employeeScore field in the Data
Source task pane.
Insert a group of option buttons on a
new, blank form template
When you design a new, blank form template,
the Automatically create data source check box in
the Controls task pane is selected by default. This
enables InfoPath to automatically create fields and
groups in the data source as you add controls to the
form template. These fields and groups are represented
by folder and file icons in the Data Source task pane.

1. On the form template, place the cursor where


you want to insert the control.
2. If the Controls task pane is not visible,
click More Controls on the Insert menu, or
press ALT+I, C.
3. Under Insert controls, click Option Button.
4. In the Insert Option Buttons dialog box, enter
the number of buttons that you want to insert,
and then click OK.
5. To change the value that is stored in the data
source when an option button is clicked,
double-click the option button whose value you
want to change, click the Data tab, and then
enter the value that you want in the Value when
selected box.

You might also like