How to add List of Countries in Contact-Form-7 using Listo
Listo is a plugin which you need to Install in order to get all the country names in the Contact-Form-7. Listo is developed by the same author who made Contact-Form-7 so it is safe to use this plugin.
Go to the Plugins page and Search for Listo. Make sure you check the author before you install the plugin.
After activated the plugin you might not see any new menu in the sidebar of the WordPress dashboard. Listo sits inside the Contact-Form-7. Open your contact form Form tab and add this code with other Form-tags. Click Save.
...
<label> Country
[select your-country data:countries] </label>
...
Go to your front-end and refresh the page, you should see a new dropdown for Countries. data:countries
is ISO 3166 standard, with 200 country options to choose.
Subgroups
Listo provides two subgroups – un
and olympic
.
-
un
: is for Union Nations olympic
: only includes Participating nations at the 2012 London Summer Olympic Games
If you want to specify the subgroup, use the period and the name of the subgroup.
<!-- To display un only -->
<label> Country
[... data:countries.un] </label>
<!-- To display olympic only -->
<label> Country
[... data:countries.olympic] </label>
<!-- To display olympic and un -->
<label> Country
[... data:countries.un.olympic] </label>