Change Dropdown choices based on dropdown

Is it possible to change a Dropdowns choices based on another Dropdowns value?

example: I have one dropdown with a size 1-10… then another dropdown with colors that are available based on those sizes. If user selects 1 then red, blue, green are his options. If user selects 4, then orange, yellow, blue are his options.

I tried to set “options” conditionally but it isnt an option. I can only set “default value” or “placeholder”.

1 Like

It’s certainly possible to do. But it depends on how you structure your database. It’s good to follow a basic SKU structure. This makes it possible for you to break the details down into their constituent parts.

Roughly speaking, you would have four tables within your app:

  • Item
  • SKUs
  • Colors
  • Sizes

For each Item, you have a list of relate SKUs. For each SKU,_ you indicate the Color and the size using values you created on each of the color and size tables.

For both dropdowns (color and size), you can set this up as a “Do a search for: SKUs”, where you have a constraint that limits based on the respective selected value of the other dropdown.

You’ll find that this structure makes doing an Amazon-style display (ie. what colors are and are not available in certain sizes) easier to build out.

1 Like