CMS Filter | Making the [All] filter work with the Active Class and Start Checked

I always fail having that All — which is a Clear button — filter work with the active class and start checked.

What I do and have:

  • Clear button (named All): it works. I use a Radio button for it as my other filters are mostly radio too
  • Active class: defined on other filters, work well on other filters

I have reported in the past that the help text picture below is very confusing. I’m all to propose a revision as soon as I’ll understand how to make this All work.

To be clear, what I want and fail to achieve:

  • The All button with the active class when the page loads
  • The All button with the active class when I have clicked on a filter and clicked back again on All (Clear)

Sorry I can’t publicly post the link of the current project, I’ll pass that in PM to who’s skilled with the All button and active class and willing to help me. Thanks in advance.

1 Like

Hey @vincent here is a guide that might help you. Any questions feel free to DM me!

Hi Luis,
Has there been an update on the radio buttons as of yet?
I’m wanting to filter the ‘Fund 1’ button to be active on page load and not ‘Exited’.


I believe a fix would be to make Fund (All) a separate radio button, but if there’s a quicker solution I’d love to know.
Cheers Leah

Hey @leah! Normally the “All” button is a button that is not part of the CMS Collection (if you are using one for the filters). In this case, I believe you have set the checked = checked attribute to all the buttons in the collection list, making only the last one the checked one.

You can add the “Fund 1” button as a static button and filter the collection for the other buttons so it is hidden. If you have any issues please share a read-only link and I’ll take a look :wink: