InfoPath list of countries for drop-down

Want a drop-down list of countries for use in your InfoPath form? The guys at forms on fire have kindly created an XML file which makes this easy.

  1. Save the file (countries or US states – we’ll work with countries from now on) from the link above;
  2. In InfoPath, add a new Drop-Down List Box control, then right-click it and choose Drop Down List Box Properties
  3. On the Data tab, under List box choices, choose Get choices from an external data source and click the Add… button to the right of Data source.
  4. In the Data Connection Wizard, Select Create a new connection to: and Receive data then click Next >.
  5. Choose XML Document then Next >.
  6. Click Resource Files…
  7. In the Resource Files dialogue, click the Add… button and choose the CountryLookup.xml file you downloaded above. Click Open, then OK.
  8. Back in the wizard, click Next >, enter a name for the data connection e.g CountryLookup and click Finish
  9. Back in the Drop Down List Box Properties dialogue we need to specify the name of the repeating entries in the xml file so click the button to the right of Entries and select the repeating group – in this case ‘country’:
    CountryLookup
  10. Click OK, then use the similar buttons to choose which fields you wish to use for the Value (what is saved when users choose this country) and Display Name (what they see in the box) – in this case, ‘name’. Click OK and test.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.