Capturing country code while displaying name in the advanced registration forms
-
Hiya,
I want to capture country code in my advanced registration form. I see that I can add values to the dropdown, but whatever value I add ("United States") seems to be the value displayed ("United States").
How can I add "US" and have "United States" displayed?
-
Currently the way you would do that is by using the short version in the custom field definition. This will be the programatic value that is persisted. For example:
US DE
Then in your message bundle (managed by the theme), you can translate those values into a more human readable option.
US=UNITED STATES DE=GERMANY
If we do not find a localized key, we will just use the key as the value which would then render as
<option value="US">US</option>
. -