Having a "select all" option in a drop down menu that's not blank

I have a search page where I am using drop down menus to apply filters. It is for teacher resources, so one filter is for grade level, and the second is for subject and the subjects are filtered by grade level. I am trying to figure out how to have all of the subjects show up when there is not a specific grade selected. I achieved this by adding an “all grades” to my grade level option set, and then add “all grades” to the “grade level” attribute of each subject. Now my problem is that my repeating group is set up to show only the resources that contain the grade level selected in the grade level dropdown in their field “grade level,” so that rather than showing all resources when “all grades” are selected" it shows nothing. Please help!

What I would like is if the blank space a the top of the option set which functions as an “all” option, could actually state that, and then have the effect of not filtering the subject drop down menu.

Hey @hcomforto :wave:

You can use an option set with attributes. Simply, you will create a Grades option set with Value attribute. You will have All as the first option, with no value. Then, the other grades will have the corresponding values.

In your dropdown, you will display the Display attribute of the Grades (That’s how you have All in the dropdown). In your search though, you will use the Value attribute as constraint, so that Ignore Empty Constraints will still work.

See the demo below:
brave_PQRPfUf7jr

Here is the details:

  • I simply have this option set:

    • image
  • The value attributes of the options are empty, 1, and 2:

    • brave_F6wWO3zvHh
  • And your dropdown will show this option set:

    • image
  • Your search constraints will be using the Value attribute:

You can check my sample here: Bubble Demos by Flusk | Bubble Editor

You can add multiple of these dropdowns in the same (or similar way). I hope this helps.

bdk_512x512 @Huseyin from Flusk | Discover the #1 Security and Monitoring Tool for Bubble

Thank you, this is helpful and makes sense, however I am seeing this when I try to do that: (I used “number” instead of “value” to keep things clear.

This is most possibly because grade level list type is not same as the number attribute of the option set?

bdk_512x512 @Huseyin from Flusk | Discover the #1 Security and Monitoring Tool for Bubble

How do I change the list type?

You don’t have to if you use it other places. Just change the attribute type of the number attribute in the option set to match to the type of grade level.

If this doesn’t solve your problem, you have to show me your option set and resource data type.

bdk_512x512 @Huseyin from Flusk | Discover the #1 Security and Monitoring Tool for Bubble

Thanks, i figured it out. I had to make the attribute type “grade level” so it would match the field in the resource. Now it works. Thank you!

1 Like