Thursday, August 11, 2016

Select ALL Items in Multiselection Listbox in Infopath 2010

The easiest method for accomplishing this will be the following:
  1. Open the list form template in InfoPath Designer.
  2. Go to File >> Publish >> Export as Source Files.  Choose a folder to save these to.
  3. In these source files you will see the template.xml file.  Open this in your favorite text editor.
  4. Search for the section in this XML file which contains the name of the Multiple-Selection List Box data.
Names may be different:
<my:multidefault_x0020_checkboxes>
    <Value>Apples</Value>
</my:multidefault_x0020_checkboxes>
Add the list of choices you would like to be checked by default, so it looks similar to this:
<my:multidefault_x0020_checkboxes>
    <Value>Apple</Value>
    <Value>Orange</Value>
    <Value>Grape</Value>
    <Value>Pear</Value>
    <Value>Etc</Value>
</my:multidefault_x0020_checkboxes>
Save this file and go back to the XSN's source files.  Right click on the manifest.xsf file and go to Design.  Quick Publish back to the server.
Test it out!  Let me know how it goes.

No comments:

Post a Comment