How To Build Dynamic Dropdown Elements

In a few minutes you can build a pretty advanced data structure with responsive content.

Bubble
September 29, 2015 • 4 minute read
How To Build Dynamic Dropdown Elements

One question that comes up often in Bubble forums is “How can I build a form with dependent dropdown elements?” In other words, how can there be multiple dropdowns on a page, where the options of the second or third dropdown depend on the content of the first one (e.g. picking a city once a country has been selected). We’re going to build an app that does this, and then display a picture of the city that has been selected in the second dropdown.

You can see the app here: https://bubble.i0/site/countrycity/

And you can edit the app here: https://bubble.io/page?id=countrycity

Here is what it look likes:

City Picture Picker App rendition.

To do this, we want to have the choices of the dropdown menus to be dynamic, and have their options come from our app database.

The first thing we need to do is to define the different options we want to offer. In other words, the different countries and cities. We do this in an ‘admin’ page, where we’ll be able to create some ‘things’ and define some relationships between them. Let’s first create a new page named ‘admin’.

Create a new page feature in Bubble creator. Page name input.

Alright, let’s get into the logic of our data structure. In our country/city example, we want to create two types of things. One is a ‘Country’, one is a ‘City’. Let’s start with the country form. In a simple case, a country has a name. So let’s add a input form. We also want to add a save button.

Bubble creator. A gray save button is to the right of a search box.

The workflow here is quite simple: when the user clicks on ‘Save’, we create a new ‘country’ with this name. We define the ‘Country’ type as we build the workflow.

Bubble workflow settings to define actions for Create New button.

Now let’s build a second form for the city. Let’s insert an input element for the city name and a picture input for the picture. As we want the city to be attached to a country, let’s insert a dropdown where we’ll pick the relevant country. We also want a ‘Save this city’ button.

The options of this dropdown should be dynamic, as they will be the list of countries that have already been created. To do this, let’s pick ‘Dynamic choices’ as ‘Choices style’ and then pick ‘Country’ as a type of choices. For the list itself, let’s just want to search for all countries that have been created. For the caption, we can pick Current option’s name. Here is what it looks like.

Appearance editor for dropdown menus in Bubble creator.

Good. Now let’s build the workflow that saves the city when the users clicks on save.

Workflow defining what to do when the save button is clicked.

We want to use the action ‘Create a new thing’ here. The type of thing we’re going to create is a “City”. A City will be defined by a “name” and a “picture” – so let’s create both fields. The name and image fields are quite straightforward; it’s a text and an image. For the country field, the type should be ‘Country’ (which is the type of things we just created).

Create a new field dropdown settings in Bubble creator.

So when we create the new city, we save the country that is selected in the dropdown.

Black on gray settings with name, picture, and country inputs.

Alright, we’re good with our data structure and submission forms. We can now move to the customer-facing page where people can select a country and a city (and see a picture of it). Let’s add two dropdown elements on our main page and an image below them.

Two dropdowns added to City Picture Picker app: pick a country/pick a city.

For the first dropdown, let’s change the placeholder to ‘Pick a country’ and make the choices dynamic (as they’re coming from saved countries). We display all submitted countries, so we don’t have constraints on our search.

Black on dark gray - Bubble dropdown appearance settings.

Let’s move to the second dropdown. We want the list of options to be dynamic, and only display the cities that are located in the country that is selected in the first dropdown. Let’s open the Search Palette.

What we want to search for is cities, and we want to add a constraint on the country. It should be the value of the Dropdown Country.

Alright, we just need to define which image we want to show in our image element, and we’re done. We double click on the image and look at the Dynamic Image field. When we click on ‘Insert dynamic data’, I can choose the content of the dropdown ‘City’, and then get the image.

And we’re done! In a few minutes, we’ve build a pretty advanced data structure with responsive content. You can add a lot of feature to such an app, voting on pictures, looking for hotels, booking them, etc.

Learn more about Bubble and sign up for free to begin your no code journey:

Bubble-CTA@2x-3

Start building for free

Build for as long as you want on the Free plan. Only upgrade when you're ready to launch.

Join Bubble

LATEST STORIES

blog-thumbnail

The Best Way to Create a Mobile App for iOS and Android: 8 Steps

New to mobile app development? Our step-by-step guide will take you from idea to published app — and beyond — in eight steps, no coding required.

Bubble
August 21, 2026 • 17 minute read
blog-thumbnail

The 9 Best No-Code App Builders in 2026 for Founders

Compare the top no-code app builders for web and native mobile — what they’re best for, how they scale, and how much they really cost. Find the right platform to launch a real product without code.

Bubble
August 20, 2026 • 21 minute read
blog-thumbnail

What Is Bubble AI and How Does It Build Apps?

Bubble is an AI-powered platform to generate working apps you can see and edit. Learn what it creates, how the build process works, where mobile fits, and how it differs from AI coding tools.

Bubble
August 19, 2026 • 8 minute read
blog-thumbnail

Launch Lab Recap: How to Get Your First Users Before Launch

A Launch Lab fireside chat with Emmelie De La Cruz and thoughtbot's Vendela Colavecchio on why you should launch before you're ready, and how a waitlist helps you find users while you build.

Bubble
August 19, 2026 • 5 minute read

How Much Does It Cost to Create an App in 2026?

August 17, 2026 • 11 minute read

How to Build a Construction Management App in 2026

August 07, 2026 • 12 minute read

No-Code Security: A Complete Builder's Guide for 2026

July 31, 2026 • 12 minute read

How to Build a HIPAA-Compliant App in 2026

July 29, 2026 • 15 minute read

AI Tools For App Development: A Complete 2026 Guide

July 29, 2026 • 14 minute read

Build the next big thing with Bubble

Start building for free