Set up a drop-down with countries - Countries plugin

Hi everyone!

I want to have a dropdown element where the user can select a country.

I tried the Countries plugin but I am not sure how to set it up - I tried something but it does not work

First I installed the Countries plugin
Then

  1. Set Choices style as “Dynamic choice”
  2. Type of choices - “Country Data”
  3. Choices source - “Get data from an external API” and then selected Countries-Country Data in the list of API providers

Unfortunately, the dropdown doesn’t work

What am I doing wrong?

Thanks

Hey there. I published this plugin. In the option caption, set it to “current option’s name” and try that.

2 Likes

Hi romanmg!

Thanks for your prompt response!

I used the exact same settings and the dropdown doesn’t work properly
What I mean is that you have to click it a couple of times to actually load the countries. The way to actually work is that you click inside first -and get no response, then click outside the element somewhere, and then click inside again and the list loads properly

Do you have any idea why this is happening? Does the same thing happen to you as well? or I am doing something wrong

Again thanks for your time and for building this plugin

Ah yes, so that’s the element taking a moment to call the API, receive the response, and display the results. This is a behavior that you’d see with most calls to an external service - a bit of a lag time between when the call is made and when the response is received… on top of that, a list of countries isn’t a short list, so the dropdown needs to load them all.

You could help keep your users happy by implementing a loading screen or message so that they don’t click, see nothing, and leave.

I see…

Do you think if I created a country data type and store all the countries there, it would retrieve the list faster?

Thanks

Hai if i need to set the default value as users current country, how can i do?

and if i want to filter with 4 drop down how can i do? like, if in need to save user address in database using four drop downs (country name, region, sub region and area)

Pls help me.

Hi, I have this plugin working on a ‘Signup’ page - however the selected option is not saving to the database. Other inputs are including Name, Email, DoB etc… these being standard inputs.

Do I need to build in a ‘save’ options during the signup workflow to save the selected option?

I had same issue where I couldn’t get the user country to show as default value, this is how i got my way around this issue with a search on the Place Holder:

Capture

1 Like