Hello,
I have created a dropdown with a list of countries as the values.
I am wondering if I can define the keys, using the iso code of the countries
Hello,
I have created a dropdown with a list of countries as the values.
I am wondering if I can define the keys, using the iso code of the countries
Hi again,
No, that was not what i was referring to.
I was referring to be able to get a different value than what is displayed in the form.
For example, if I select Spain in a standard dropdown, the form will send me back ES, which is the ISO code, instead of the text that the user sees.
<select name="countries" id="countries">
<option value="FR">France</option>
<option value="US">USA</option>
<option value="ES">Spain</option>
<option value="CL">Chile</option>
</select>
My main use case is the country dropdown. Why is that important? My websites usually have 2/3 languages, so getting the name of the country in the local language instead of the ISO code means having mapping tables for each language, while I could just get the data straight at first.
That could be fixed by having, in the Dropdown definition something like this
FR|France
US|USA
ES|Spain
CL|Chile
key|text_to_show_to_user
If you can't/don't want to add such a broad feature, an alternative would be to have a "Country" question, or a dropdown in the "Contact" card for the field country. You have already built a Country dropdown for the international part of the phone field, so that would great to be able to use this separately.
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.