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.

  1. 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.

  2. 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:

    Screenshot: example spreadsheet with country codes

  3. Copy the contents of the spreadsheet column that includes the option values (column C in this example) to your clipboard.
  4. Go the Form Definition page for your form, and select XML Edit.

    Screenshot: form definition page, XML edit button

    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.
  5. In the Definition panel, locate the first option (for example "-Please Select-") for your question.
  6. Place your cursor directly after the closing triangle bracket of the option, and paste the contents of your clipboard.

    Screenshot: pasting country code options into the form definition

  7. Select Save.

Return to the visual editor, and check that the picklist options have been populated as expected.

Screenshot: viewing picklist options in the visual form editor