If a list element you wish to add to a Form has an inordinate number of options, it may be easier to manage them in an external file rather than using the Form Element editor.

Once you have created the file, you can follow the instructions on the Form Element editor screen to upload it.  Note that the file name of your options file must have an .XML extension.


A List Element option file must be created as a text file (using Notepad or some other text editor) in an XML-based format.  Here is how that file should be structured:

<optionlist>
<listoptions order="Order" text="Text">Value</listoptions>
</optionlist>

The following items should be replaced with your values:

  • Order is a sequential number representing the order in which options should be shown.  There should be no gaps in the numbering.
  • Text is the text that is displayed to the person filling out the form.
  • Value is the value that will be stored in the database.

Add as many listoptions lines as you need.


Here is an example list of a few Michigan Counties.  The State of Michigan County ID will be stored in the database.

<optionlist>
<listoptions order="1" text="Alcona">1</listoptions>
<listoptions order="2" text="Alger">2</listoptions>
<listoptions order="3" text="Allegan">3</listoptions>
<listoptions order="4" text="Alpena">4</listoptions>
</optionlist>


You can use Excel to export the spreadsheet as a properly formatted XML file (described in Step 3 of this page).

After export, edit the XML in a text editor (such as Notepad) and remove the first line (the XML declaration).  It is not needed for use in this procedure.

Also, there are a few special characters in XML that should not appear in the Text or Value areas of your XML file. Replace those characteres with the Entity References shown in this table:

Character Meaning Entity Reference

>

Greater than

>

<

Less than

<

&

Ampersand

&

%

Percent

%

'

Single Quote

'

"

Double Quote

"

Component for this Procedure: Form
Minimum Community Center Version: 4
User Role: Site Manager
Procedure Link: http://www.liaa.org/howtoprocedure.asp?howtoid=86