How do i clear everything except one engaged filter?


I have a search filed and a search clear button, and I also have category filters. I want the clear button to clear everything EXCEPT the engaged category filter. I have tried using fs-cmsfilter-clear=[all identifiers listed here except Category] and it breaks the whole thing… How do have my clear button clear everything but not the engaged Category filter?

Thanks @Support-Luis !

Hey @conormckiernan! I’m afraid we don’t have this natively for CMS Filter, however, we can add some custom code on top of the solution to achieve this.

You’ll just need to:

  1. Remove the fs-cmsfilter-element = clear and the fs-cmsfilter-clear=[all identifiers listed here except Category] from your clear button
  2. Add an id such as reset to this element
  3. Add the following code to the </body> tag on your custom code section of the page
  window.fsAttributes = window.fsAttributes || [];
    (filterInstances) => {
      console.log('cmsfilter Successfully loaded!');

      const [filterInstance] = filterInstances;
      const resetButton = document.getElementById('reset');

      // Function to save the selected radio button to localStorage
      function saveSelectedRadio() {
        const selectedRadio = document.querySelector('input[name="Radio"]:checked');
        if (selectedRadio) {

      // Function to load the selected radio button from localStorage
      function loadSelectedRadio() {
        const selectedRadioId = localStorage.getItem('selectedRadio');
        if (selectedRadioId) {
          const selectedRadio = document.getElementById(selectedRadioId);
          if (selectedRadio) {
            selectedRadio.checked = true;

      resetButton.addEventListener('click', () => {

Let me know how it goes! :muscle: