How an I populate list of countries in a drop down menu without using external modules

I have a requirement to show the list of countries in a drop down menu. How can I achieve this without using any external modules.
1 answers

Hi Meghna,

if you don’t want to fetch the list of countries from the database, you can do it by using a REST call.

just add a JSON object and apply import mapping and then do a rest call.

( You will also find the JSON object through this link and you can do the rest call through this link also )

here’s the API. Just use it and populate your list through the REST services and your work is done. Its totally upto you, what you want to import and what you don’t because there is everything regarding the countries.


Hope it helps!