How to populate list of Countries with 3 letter code as value in dropdown field?
Hi everyone,
I'm working on Adaptive form in which I've dropdown for Country Names. Now, I want to populate the list of full country name, but the values should be their 3-letter code. Something like below.
<option value="AZE">Azerbaijan</option>
<option value="AUS">Australia</option>
Adding 105 items manually to the dropdown field is lengthy. So, I tried Function Output feature of AF but I can only populate country names without their codes like below:
<option value="United States">United States</option>
<option value="Norway">Norway</option>Got above output by using this:
const countryList = [
"Afghanistan",
"Albania",
"Algeria",
"American Samoa"];But can't leverage this:
const countryListAlpha3 = {
"AFG": "Afghanistan",
"ALB": "Albania",
"DZA": "Algeria"};Using country list from this (line 528 have 3-letter codes) GitHub link. I'm not sure how to add value to dropdown items.
Can someone please help me to accomplish this?
Regards,
Sesmic