Insert a group of option buttons
You can insert a group of option buttons on your form so that your users can quickly enter specific values. Option buttons are used to offer users a single choice within a set of mutually exclusive choices.
A group of option buttons is bound to a single field in the data source. When a user clicks an option button, the value associated with that option button is stored in the field.
Insert a group of option buttons (automatically create the data source)
You can have Microsoft Office InfoPath 2003 automatically create the data source when you insert option buttons. If you do this, InfoPath creates a field that is bound to the group of option buttons.
- In design mode, place the insertion point where you want to insert the option buttons.
- If the Controls task pane is not visible, click More Controls on the Insert menu.
- In the Controls task pane, select the Automatically create data source check box.
Note If the check box is not available, the form's design does not allow the data source to be automatically created. You must insert a group of option buttons that is bound to an existing field or to a field that you create.
- Under Insert controls, click Option Button.
- In the Number of option buttons to insert box, in the Insert Option Buttons dialog box, enter the number of option buttons that you want to insert, and then click OK.
- To change the value that is stored in the data source when an option button is clicked, right-click the option button, click Option Button Properties on the shortcut menu, and then, in the Option Button Properties dialog box, enter the value that you want in the Value when selected box.
Note By default, the first option button in the group saves the value "1" when clicked, the second saves the value "2," and so on.
Insert a group of option buttons (bind to an existing field)
- In design mode, place the insertion point where you want to insert the option buttons.
Note If you are binding the option buttons to a repeating field, the option buttons must be inside a repeating control, such as a repeating table or repeating section.
- If the Data Source task pane is not visible, click Data Source on the View menu.
- In the Data Source task pane, right-click the field that you want the option buttons to be bound to, and then click Option Button on the shortcut menu. If Option Button is not on the shortcut menu, click More. If you still do not see Option Button, make sure the field does not have a rich text or picture data type.
- In the Number of option buttons to insert box, in the Insert Option Buttons dialog box, enter the number of option buttons that you want to insert, and then click OK.
- To change the value that is stored in the data source when an option button is clicked, right-click the option button, click Option Button Properties on the shortcut menu,
and then, in the Value when selected box in the Option Button Properties dialog box, enter the value that you want.
Note By default, the first option button in the group saves the value "1" when clicked, the second saves the value "2," and so on. The acceptable values depend on the data type of the field to which the option buttons are bound.