Freigeben über


Introducing the Multi-Select List Box

InfoPath 2007 introduces a new control, the multi-select list box, for cases when you want to allow users to select one or more items from the list of options. This list of options may be static, or may come from a data source. For example, you may use a multi-select list box to let the user pick the cities affected by the marketing campaign:

 

You may also allow users to specify items not on the list by going to Multi-Select List Box Properties, and setting the option to allow users to enter custom values:

 

Data source

Multi-select list box stores data in a repeating field. Every time a user checks an option, a new instance of the repeating field is added; every time an option is unchecked, a field is deleted. This is just like the Bulleted List control.

 

Let's analyze the data source at design time, and what goes into the XML when the form is filled out:

 

User Input
     Chicago New York
     Boston

  

Default Values

To specify which (if any) items should be checked in the multi-select list box by default, click Default Values on the Tools menu. Using the marketing campaign example, if you don't want any option to be selected by default, uncheck the only "city" item:

 

 

When you do this, you may see a design-time message that the "Control is bound to a missing field or group". You can safely ignore this message in this case since the point is to not have any checked by default.

 

If, instead, you want several options to be checked by default, right-click on the city item, then click "Add another city below", and specify default values for both cities:

 

 

Compatibility

Multi-select list boxes are supported only in InfoPath 2007 client.

 

- Alex Weinstein
Program Manager

Comments

  • Anonymous
    July 14, 2006
    The comment has been removed

  • Anonymous
    July 14, 2006
    The comment has been removed

  • Anonymous
    September 14, 2006
    Have you ever created a form which allows the user to choose items from a list and you wanted to...

  • Anonymous
    October 25, 2007
    Is it possible to do the opposite and make sure that a user does not select more than a certain number of options from the mult-select listbox?

  • Anonymous
    January 03, 2013
    Is there a way to make it all check upon loading the form

  • Anonymous
    January 03, 2013
    How can i select all the item in multi-select list?

  • Anonymous
    December 18, 2013
    The comment has been removed

  • Anonymous
    February 05, 2014
    The comment has been removed