Answered

Adding location as a dropdown

  • 4 April 2024
  • 4 replies
  • 25 views

Hello everyone,
I have seen this discussions related to this topic. But i am not able to find a particular solution to my problem.

I want to add a location service dropdown. 
In my first question i want to ask user for the country. Based on the selected country, i want to ask user for the city. How can this be done?
I am able to create a dropdown for country and also a dropdown for cities for all countries. 
But i am not able to do a logic jump based on answer.

Any help is appreciated
Thanks in advance

icon

Best answer by Liz 4 April 2024, 15:32

View original

4 replies

Userlevel 7
Badge +5

Hi @MohitTembe Happy Thursday! I hope you’re having a good one. You could use these kinds of logic jumps to show different variations of dropdowns based on the previous answers. Though, this would require you to create as many dropdowns as combinations exist. 😅

What might be easier instead is to build this form with Formless, which can usually accommodate logic like this a little easier! For example, you could tell the AI to ask the secondary question with the city according to the country they have chosen. 

Hey @Liz . Thanks for getting back. I would definately have a look into the formless. I dont think these logic jumps would make sense in the case explained above. As for 200 countries i would need 200 more questions and 200 logic jumps. Thanks

Userlevel 7
Badge +5

Yeah...it would be a bit of a setup, @MohitTembe ! I tried using some more complicated logic with Formless and it was a lot easier!

Userlevel 7
Badge +6

@MohitTembe @Liz - I think that if you used the type of solution that @mathio posted here it might work easier

conceptually, you would create your ‘database’ of countries and cities in a Google Sheet. 

in the first typeform, you select the country from the drop down and then pass the selection to the Google Sheet to filter and query the cities for that country. Then these are passed back into a second typeform and into a dropdown list using the APIs. 

In theory, this would allow you to get to this in two typeforms. 

i’ve not done this as I don’t work with APIs but there are several posts in the Community about dropdowns and APIs in addition to the link i posted re @mathio ‘s solution. 

cheers

des

Reply