Insert a group of option buttons InfoPath 2007
Author: mety Labels:: Insert a group of option buttons InfoPath 2007You can insert two or more option buttons on your Microsoft Office InfoPath form template when you want users to select one choice from a limited set of options. Use a group of option buttons on your form template to present a small number of related but mutually exclusive choices to users. In the following illustration, employees and managers click option buttons to rate job performance on a performance review form. In each section, users can select only one button. When users open a form that is based on your form template, none of the option buttons are selected by default. If you want one of the option buttons to be selected when users open the form, you can select the This button is selected by default check box (Option Button Properties dialog box) for that option button. Related controlsInfoPath includes controls that are similar to option buttons but that serve different purposes. To decide which of these controls works best on your form template, refer to the following list: Check box Like an option button, a check box supports options that are either on or off. The difference is that you typically use check boxes for yes/no decisions or nonexclusive choices. List box Like a group of option buttons, a list box enables users to select from multiple options on the form. However, with list boxes, users make their choice by clicking an item in the list, rather than by clicking a small circle. The user experienceWhen users fill out a form that is based on your form template, option buttons appear as small circles with labels next to them. When users click one of the buttons, a dot appears in the middle of that circle. In any set of option buttons, only one button can be selected. Insert a group of option buttonsThe 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 (design mode: The InfoPath design environment in which you can create or modify a form template.). 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 templateWhen 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.
Insert a group of option buttons on a form template that is based on an existing data sourceIf you base the design of your form template on an existing Extensible Markup Language (XML) file, database, or Web service, InfoPath derives the fields and groups in the Data Source task pane from that existing data source. In this scenario, you can insert a group of option buttons by dragging a field from the Data Source task pane onto the form template or by inserting a group of option buttons from the Controls task pane instead, as described in the following procedure:
Layout tipsUse the following tips to help you refine the appearance, size, and other aspects of a group of option buttons:
|