Hi!
My website creates musician profiles with Formit, formit2resource (Formit input is written into a database to create resources). I am using FormItCountryOptions snippet to output a dropdown list of countries! The countries are stored in an array in /core/components/formit.includes/us.countries.inc.php in a format:
‘AF’ => ‘Afghanistan’,
‘AL’ => ‘Albania’,
…
So, you can fill in the form, choose your country from the dropdown and submit it. The snippet allows to optionally save either country names or iso-codes.
I wonder if there’s an easy way to retrieve for displaying on site pages both name and code? So, for example for Afghanistan, I would like to output the results as Afghanistan, AF.
Thank you, Bruno. My php is helpless. Can you please provide an example of how to output the country name? This is a snippet. I can save it and name something. Then I need to call it in my chunk… and what happens? I don’t get it