Tabs with filters

Hi! I have a question. I’m working on functionality for automatically filtering events into upcoming and past categories. In CMS, there’s a date field, and I need it to function like filters. Additionally, other filters should apply as well. For example, if there are 10 events, I can select a filter by type, and then I should be able to toggle between upcoming and past events while keeping the type filter active.

I’ve tried several methods:

  • Tabs: Filters work, but the empty state doesn’t display correctly.
  • Webflow visibility conditions: These don’t work since they only apply display: none.
  • Date-based filtering on the front end: Filters are triggered too early.
  • Restarting the filters after a date check: Still didn’t work.

Any advice would be greatly appreciated!

Hey @denys.syzomov!

Is this the only blocker you found for this option?

Date-based filtering on the front end: Filters are triggered too early.

If so, can you try moving the JS you are using into this callback function?

<script>
  window.fsAttributes = window.fsAttributes || [];
  window.fsAttributes.push([
    'cmsfilter',
    (filterInstances) => {
      console.log('cmsfilter Successfully loaded!');

      // Code to filter by date goes here!
    },
  ]);
</script>

If needed please share the link to your setup and I will take a look!