How to display filtered dropdowns from option sets?

Hi, this is my first question on Bubble so please be gentle…

I have a form that allows a user to view/update their profile. I have a couple of Dropdowns based on option sets. I want to be able to show the contents of the second dropdown filtered based on the contents of the first. So for example if the user selects ‘Fruit’ from the first dropdown, they only see the associated Fruit options in the second dropdown :

Dropdown Option List 1:

  • Fruit
  • Sports Cars
  • Classical Music Composers

Option 2:

  • Apple
  • Banana
  • Alfa Romeo
  • Bentley
  • Bach
  • Beethoven

For the second ‘child’ option set I’ve created an attribute linked to the options of the ‘parent’ option set. So for example ‘Apple’ and ‘Banana’ are connected to the first option set by an attribute of Fruit. But I have no idea how to filter the second dropdown based on the first dropdown option selected. The options are all static and not subject to change so ideally suit to option sets.

Really looking forward to working out how to solve this puzzle!

Thanks in advance.

1 Like



You need one attribute on the two option sets. Let´s say “number”. So in each option set option, you enter “1” if it´s a fruit and “2” if it´s a car.

For example.

In your first dropdown you have selected “Apple”, so the number attribute of dropdown 1 is “1”. And the you filter dropdown 2 with something like:

All Name of the option set :filtered with number = dropdown 1´s number. :slightly_smiling_face: :computer:

Whoa, that was quick!

I’ll give that a try and let you know.


1 Like

Well, I managed to get this far…

In the constraint try putting something like "dropdown 1 value´s number = to this countryareas number

So I’m not sure I did it the way you suggested but you definitely got me on the right track - thank you so much!

Here’s the solution that works:


Critically, this only works if the attribute you add to the ‘child’ option set is added as a list (multiple entries)

This topic was automatically closed after 70 days. New replies are no longer allowed.