Streaming live at 10am (PST)

Country select list - Yes, again

I know this has been asked before, but what’s our current best workaround for getting a “select country” list into our forms? (Not ecommerce, just regular forms.)

  1. Assuming that maximum number of items for select is still 100, and adding them all is a huge PITA
  2. Maximum characters for custom code is 10,000 (not enough to copy/paste the required HTML)

I see on other posts (e.g., Adding Country List in Contact Forms ) there was a JS option posted, but the code snippets seem to have disappeared.

Any help? Otherwise I’m just gonna get people to type in their own country and I’ll deal with the typos. :slight_smile:

1 Like

Do it: add the 100 countries in the dropdown, come back here, make a post to share it, for the community to copy and paste on their own sites, be a community hero :joy:

Hahaha, ok, here’s what you do.

STEP 1: Add a custom code box into your form,

STEP 2: Find an HTML snippet for a country select (e.g., https://www.mediacollege.com/internet/samples/html/country-list.html <== you will need to use the one with the 2-letter country code, for reasons you’re about to see…)

STEP 3: Paste into custom code box. See that it has more than 10,000 characters (but only slightly. Good thing you used the one with the 2-letter country code :partying_face:).

STEP 4: Quietly “trim” a few country names that are excessively wordy (e.g., “Macedonia, The Former Yugoslav Republic of” = “Macedonia”. Sorry Macedonia.)

STEP 5: Pick a few countries that you suspect you will never, ever, ever see a customer from. Delete them. You are now under 10,000 characters. :partying_face:

profit.

1 Like

The JS option is still available, you just need to click on the link in the thread you referenced.