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 (bind: To connect a control to a field or group in the data source so that data entered into the control is saved. When a control is unbound, it is not connected to a field or group, and so data entered into the control will not be saved.) to a single field (field: An element or attribute in the data source that can contain data. If the field is an element, it can contain attribute fields. Fields store the data that is entered into controls.) in the data source (data source: The collection of fields and groups that define and store the data for an InfoPath form. Controls in the form are bound to the fields and groups in the data source.). When a user clicks an option button, the value associated with that option button is stored in the field.

ShowInsert 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.

  1. In design mode, place the insertion point where you want to insert the option buttons.
  2. If the Controls task pane is not visible, click More Controls on the Insert menu.
  3. 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.

  1. Under Insert controls, click Option Button.
  2. 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.
  3. 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.

ShowInsert a group of option buttons (bind to an existing field)

  1. 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 (repeating field: A field in the data source that can occur more than once. Controls such as bulleted, numbered, and plain lists; repeating sections; and repeating tables can be bound to repeating fields.), the option buttons must be inside a repeating control, such as a repeating table (repeating table: A control on a form that contains other controls in a table format and that repeats as needed. Users can insert multiple rows when filling out the form.) or repeating section (repeating section: A control on a form that contains other controls and that repeats as needed. Users can insert multiple sections when filling out the form.).

  1. If the Data Source task pane is not visible, click Data Source on the View menu.
  2. 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 (data type: Property of a field that defines the kinds of data the field can store. Examples of data types include Text, Rich Text, Whole Number, Decimal, True/False, Hyperlink, Date and Time, and Picture.).
  3. 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.
  4. 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.

 
 
Applies to:
InfoPath 2003