How can I create a multi-select filter in Webflow for custom dynamic filters, including code examples and a video tutorial? I have already implemented a custom dynamic filter using this forum (), but I want to allow users to make multiple selections for content filtering. Any guidance or assistance would be greatly appreciated. Best regards, Tony

TL;DR
  • Build checkboxes with consistent classes and data attributes for each filter category outside the CMS list.  
  • Tag each CMS item with filterable attributes using data attributes (e.g., data-tags) to match checkbox values.  
  • Use JavaScript to track checkbox selections, compare them with item tags, and show/hide items based on matching logic.  
  • Modify the script to use "AND" (every) or "OR" (some) logic depending on your filtering needs.

To create a multi-select filter in Webflow for custom CMS-based filtering, you'll need to enhance your existing custom filter setup with JavaScript that handles multiple option selections per category (e.g., selecting multiple "Tags" or "Categories" simultaneously). Webflow doesn't natively support this, so you'll be combining CMS collectionscustom checkbox UI, and JavaScript logic.

---

1. Set Up the Filter UI in Webflow

  • Create a list of checkboxes using native Webflow elements (not inside a CMS Collection List).
  • Use consistent class names for each filter category, e.g., all tag checkboxes should use the class filter-tag.
  • Set custom data-attributes for each checkbox to identify the filter value, like data-filter="design" or data-category="branding".

---

2. Structure Your CMS Collection Properly

  • Ensure each CMS item includes multi-reference fields or rich text fields that reflect your filterable attributes (e.g., Tags, Categories).
  • When rendering these in your Collection List, assign relevant data-attributes (e.g., data-tags="branding design ux").
  • Use hidden span elements or divs inside each CMS item to store these values for filtering logic.

---

3. Add the JavaScript for Multi-Select Filtering

  • Use JavaScript to:
  • Detect selected checkboxes
  • Parse attribute values for each CMS item
  • Compare selections with item attributes
  • Show/hide items accordingly

Example (include this script in an Embed element placed at the bottom of the page):

<script>
  document.addEventListener("DOMContentLoaded", function () {
    const checkboxes = document.querySelectorAll('.filter-tag');
    const items = document.querySelectorAll('.cms-item'); // adjust this class to match your CMS item wrapper
    
    checkboxes.forEach(checkbox => {
      checkbox.addEventListener('change', filterItems);
    });

    function filterItems() {
      const selectedValues = Array.from(checkboxes)
                                  .filter(cb => cb.checked)
                                  .map(cb => cb.getAttribute('data-filter'));

      items.forEach(item => {
        const itemTags = item.getAttribute('data-tags').split(' ');

        // Checks if any selected filter matches itemTags
        const match = selectedValues.every(val => itemTags.includes(val));

        if (selectedValues.length === 0 || match) {
          item.style.display = '';
        } else {
          item.style.display = 'none';
        }
      });
    }
  });
</script>

  • Make sure each CMS item uses data-tags="branding design ui" where the values match filter options.

---

4. Optional: Adjust Filtering Logic (ANY vs ALL)

  • The example above uses “ALL filters must match” logic (Array.every()).
  • To allow for “ANY filter match”, switch to Array.some():

const match = selectedValues.some(val => itemTags.includes(val));

---

5. Video Tutorial Suggestion

If you'd prefer a step-by-step visual guide, refer to Jetboost's advanced filtering tutorials on YouTube:

  • Try: "How to create multi-select CMS filters in Webflow (without Jetboost)" by Finsweet.
  • Or search: "Webflow multi-select CMS filtering custom code" on YouTube.

There isn't a single official video for this exact setup, but the Finsweet CMS Filter tutorial series covers near-identical configurations.

---

Summary

To enable a multi-select filter in Webflow, use checkboxes with data-filter attributes, mirror filter terms in data-tags on each CMS item, and use JavaScript to handle selection logic and conditional display. Customize logic as needed for "AND" vs "OR" filtering. For visuals, check related tutorials by Finsweet or Jetboost.

Rate this answer

Other Webflow Questions