Configuring long picklists
Picklists such as those for countries, states, or counties can include many values, and can be difficult to enter manually. To enter long picklists with many options, you can import values from a spreadsheet editor such as Excel and paste them directly into your form's XML definition.
-
Begin by adding a single option, for example: "-Please Select-". This will be the first option in the drop-down list, and can be set as the default option for the question.
-
Next, prepare a spreadsheet that contains all the option prompts and values you want to appear as options for the question. In this example, the Excel spreadsheet has a list of country names and country codes . The ISO country codes will be used as the value for each option, and will be what is written to the form's linked data object.
The XML code for the option is in the form:
<option value="AU">Australia</option>
Where "Australia" is the display name for the option (the prompt ), and AU is the value that will be recorded.
Your spreadsheet will look like this:
- Copy the contents of the spreadsheet column that includes the option values (column C in this example) to your clipboard.
-
Go the Form Definition page for your form, and select XML Edit.
Tip When editing XML, it is a good idea to take a copy of the original XML form definition in case you make a mistake. Incorrectly formatted XML can stop your form working as expected. - In the Definition panel, locate the first option (for example "-Please Select-") for your question.
-
Place your cursor directly after the closing triangle bracket of the option, and paste the contents of your clipboard.
- Select Save.
Return to the visual editor, and check that the picklist options have been populated as expected.