Filter dropdown results after selecting another dropdown

Hi,

I’m trying to filter a second drop down based on which option the user selects in the first one.

I know this has been discussed in numerous other threads but I can’t seem to get my head around previous solutions and some are a couple of years old so I want to make sure I understand the most up to date methods.

For context:-


I’ve created an option set with all of my vehicle makes and within each make have ‘modified’ the attributes to include the various models of each vehicle attributed to the specific make.

I’ve managed to display the vehicle makes in the first drop down however, i’m struggling to modify the second drop down to show and filter the models based on the users ‘make selection’ in the first drop down.

any support would be great.

If your Makes option set has a list of Models for each make (which I think is what you’re saying?), you just need to display the selected Make’s Models.

If your Makes option set doesn’t have a list of models, but rather your Models Option Set has an Attribute of Make, then you just need to display All Models: filtered, where the Make is the selected Make.

Hi Adam,

thanks for the advice, apologies i’m new to bubble and nocode in general.

This is how i’ve set it up, i’ve added an attribute for ‘Vehicle models’ with a type of text (list) and then manually gone into each make in the option set and modified the attribute to include a list of models.

Is that correct? if so how would I display this in the drop down feature?


thanks for the help

Personally I’d have used 2 separate Option Sets for this (one for Makes, and one for Models), and avoided using a list of Texts (use a list of Options instead).

But in any case, your current setup is fine, so the way to do this is exactly what I said in my last reply.

i.e.

For your makes dropdown you need to show a list of All Vehicles.

And for your Models dropdown you need to use the Selected Vehicle’s Vehicle Models.

Would it be easier with 2 option sets?

I’m stuck trying to understand the filter command.

Not particularly…

I’m not sure why you’re using a filter here (I never mentioned using a filter).

The Choices source should just be the selected Vehicle’s Vehicle Models.

i.e.

VehicleDropdown's Value's Vehicle Models (or something like that, depending on your element names etc.)

And, obviously, as your Vehicle Models attribute is a list of Texts, the ‘Type of Choices’ needs to be ‘Text’.

So i’ve set up the first drop down as ‘Type of Choices’ = Vehicle (my option set) however, the second drop down doesn’t allow me to select it as ‘Type of Choices’ Text as you’ve said as it’s not compatible

Screenshot 2024-09-18 at 14.25.18

Is the vehicle Model attribute definitely a list of texts?

And the dropdown type of choices is definitely set to ‘text’?

Yeah, definitely both selected correctly…

Screenshot 2024-09-18 at 14.33.15
Screenshot 2024-09-18 at 14.34.28

I’ve fixed it mate, I deleted the input form and re-added it.

seems to have bugged due to how many times i’ve changed it most likely.

thanks for the help

1 Like

I actually recorded a video a while ago that explains how to do this. You can see it here:

Using Option Sets in Bubble.io to create linked dropdown
https://youtu.be/tucIrNfrjHk