Drop Down HELP.

Good Morning.

I have a site that has pages with the names of registered cities, so for this, I create buttons that direct to these cities in the initial screen of the site: www.axemaps.com.br however the number of cities is increasing, and inserting buttons with the name of cities is no longer getting aesthetically beautiful on the page.

I would like to know if you have to configure the Wix Code Drop Down, so that I can select from the list, to which city the user will be directed (page). I’m grateful now.

ps. Sorry for English, but I’m from Brazil and I’m using a translator.

If you enable Wix Code/developer tools, you can create a collection. The collection is like a database. You can then add the city names you’d like to use in the collection and connect the drop down to the city collection.

There may be other ways to do it, too, but I just tried this one out and it seems to work.

Good Morning. I even managed to do as you told me, but the button to click and go to the selected city in Drop Down, is always pointing to a single link. see in the pictures. I need when I click the button, be directed to the page selected in Drop. Can you help me?

You would need to create an onChange event for that dropdown. Then add an IF ELSE code. If it equals this word please redirect to that page etc.

Here is a redirect code example triggered on click:
https://www.totallycodable.com/forum/codes-for-templates/log-out-button-with-redirect

This other one has an If Else statement in the code as well:
https://www.totallycodable.com/forum/codes-for-templates/combine-checkboxes-values-to-single-field

These pieces of examples should get you in the right direction.

Wow, I do not know how to thank you! I do not understand anything about programming, but I’ll try to find a way to fix it, because those buttons on my site are very ugly.

You can also watch my video on Easy Search code on YouTube. It may give you a different idea as well. You can do it all you need to do is try ; )

I’ll watch yes! Many thanks for all the tips :slight_smile: