Insert a multiple-selection list box InfoPath 2007
Author: mety Labels:: Insert a multiple-selection list box InfoPath 2007A multiple-selection list box is list of choices that looks like a scrollable list of check boxes instead of a typical list box. Users can select as many check boxes as necessary from the list. Depending on how you design the multiple-selection list box, users may also be able to type their own list item next to one of the check boxes. Use a multiple-selection list box when you want to:
In the following illustration, users can assign expenses in an expense report form to multiple categories by selecting check boxes in a multiple-selection list box. The form designer has chosen to permit custom categories. Consequently, users can enter a value in an empty box next to the last check box in the list. After you insert a multiple-selection list box on your form template, you must specify the values that you want to appear in it. Otherwise, users will see an empty box when they open a form that is based on your form template. In the Multiple Selection List Box Properties dialog box, you can type the entries yourself or configure the multiple-selection list box to retrieve entries from a database or other data source. Related controlsMicrosoft Office InfoPath includes controls that are similar to multiple-selection list boxes but that serve different purposes. To decide which of these controls works best on your form template, refer to the following list: List box Like a multiple-selection list box, a standard list box allows users to select values in a list. However, with a list box, users can select only one item in the list. Like a multiple-selection list box, a list box displays all of the items in the list by default. Drop-down list box Like any other list, a drop-down list box offers users a list of choices. However, with drop-down list boxes, the list entries are hidden until the user clicks the control. Users can select only one item from a drop-down list. Combo box If you want your users to be able to type their own list entry or choose a value from a predefined list, use a combo box instead of a multiple-selection list box. Users can select only one item from a combo box. Option buttons Like a multiple-selection list box, a group of option buttons enables users to select from a list of choices. Unlike multiple-selection list boxes, users can select only one option from a group of option buttons. In addition, with option buttons, users click a small circle to make a choice instead of clicking an item in a list box. The user experienceWith multiple-selection list boxes, users make choices by selecting or clearing check boxes in a box on the form. If the number of check boxes exceeds the height of the control, a scroll bar appears on the right side of the box so that users can see the remaining choices. You can design your form template so that users can type their own entry in the list, if necessary. In this case, a check box with an edit box appears as the last item in the list. To enter a custom value, users select the check box next to the edit box and then type their entry in the area next to the check box. For this to be possible, you must select the Allow users to enter custom values check box in the Multiple-Selection List Box Properties dialog box when you insert the multiple-selection list box onto your form template. Compatibility considerationsWhen you design a form template in InfoPath, you can choose to design a browser-compatible form template (browser-compatible form template: A form template that is designed in InfoPath by using a specific compatibility mode. A browser-compatible form template can be browser-enabled when it is published to a server running InfoPath Forms Services.). When you design a browser-compatible form template, multiple-selection list box controls are unavailable in the Controls task pane because they cannot be displayed in a Web browser. Insert a multiple-selection list boxThe procedure for inserting a multiple-selection list box 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 a multiple-selection list box looks when it is selected in design mode, before the form template designer has manually added the list box entries. 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. Multiple-selection list boxes are always bound to repeating fields (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.) inside a group (group: An element in the data source that can contain fields and other groups. Controls that contain other controls, such as repeating tables and sections, are bound to groups.). Repeating fields allow you to store more than one value in the field. In the following example, the Category multiple-selection list box on the form template is bound to the category repeating field in the Data Source task pane. 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. If 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. Insert a multiple-selection list box
Layout tipsUse the following tips to help you refine the appearance, size, and other aspects of a multiple-selection list box:
|