How to Uncheck Checkbox When Another Checkbox is Checked

Hi all, I have a search page and want to default to showing “All” products. Once the user filters to select products Beef, Pork, Chicken, etc I want it to unselect “All.” And when the user selects “All” again I want it to unselect the other buttons and return to default of all products.
I have already set up my first Custom State to filter and show only Products A when that box is checked. I was planning to repeat the process for all the other options.

PS – I plan to have many options to filter in a popup (many product types, many subcategories) and was curious if my basic Custom States method would scale properly. I plan to filter by Product Types (Beef, Pork, Chicken, Bison, etc) and Product Treatments (Organic, Grass-finished, Non-GMO, etc) – can I filter off multiple custom states on the same element?

1 Like

Hey Joshua, that’s definitely a way to go about. People on the forums will probably be able to tell you more on whether or not that would cause a slow down but I did go about it a different way when setting a forum up for someone.
You can make conditions on the group with your food items to check whether or not the corresponding checkbox is checked (through your custom states) and than to just display those options.
However with just the one screenshot I’m not sure if that’s what your already doing. If so, i second this question as I would also like to know if this is the way that gets you the best load times.

1 Like

hi @jones.joshua.d!

I think this is what you are trying to achieve? if I understood you right I mean. (9)

I only have one custom state and it controls the “All categories” checkbox. It is yes by default on pageload.

Single category checkboxes are unchecked by default since All is the default on pageload. When a user selects a single category, all is unchecked and users can keep selecting categories, once they click all all checkboxes except all are unchecked. Item lists are added/removed from the products RG based on a category filter.

here is the editor link so you can see how the workflows are built.

1 Like

Thank you very much! I don’t entirely grasp how it works, but I was able to recreate based on your editor link. Much appreciated.

1 Like

you’re very welcome. Good luck!

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