Finsweet Attributes

Automatic Filtering

No items found.
Overview
Attributes Notes
Finsweet Form Submit
401
Finsweet CMS Load
405
Finsweet CMS Nest
406
Finsweet CMS Sort
406
Finsweet ToC
407
Finsweet Prev Next
407
Finsweet Rich Text
408
Finsweet Input Counter
410
Finsweet CMS Filter
Finsweet CMS Filter
450
Automatic Filtering
452
Browser Extension Candies
Finsweet's Unbind CMS
3:41
501
Debugging
Troubleshooting your Finsweet Attributes Config
901
No items found.

Want to automatically apply a filtering configuration to your CMS filter?

You can filter on;

  • On page load, via the querystring
  • On an scripting event, like a button click

Querystring params

FS CMS Filter has an fs-cmsfilter-showquery=true option that you can apply to sync the querystring to the filter settings.

For example, it might add;

?countries=Spain&categories=Museum

Check Finsweet's docs for more.

https://finsweet.com/attributes/cms-filter

Button click or scripting event

Another option, if you have an scripting event such as a button click, you can apply your own custom configuration to the filter settings.

Important code notes;

  • You will need to set each of the filter settings you want ( text fields, options, checkboxes, list items, etc. ) in code.
  • Because script-initiated input changes do not trigger change detection on those fields, you'll need to do that manually, and you'll need to do it on every filter field you modify.

e.g. for a button ID'd button1, that checks a checkbox ID'd checkbox1;

<script>
// Button clicked
$("#button1").click(function() {

// Set a checkbox to checked
var checkbox = document.getElementById('checkbox1');  
checkbox.checked = true;

// Fire a checkbox changed event
var event = new Event('change');
checkbox.dispatchEvent(event);

});
</script>

Scrolling on filter

If your filter results are in a DIV id results, you can apply your filtering and then scroll to the results.

  var container = document.getElementById('results');
  container.scrollIntoView({ behavior: 'smooth' });

Table of Contents
Did we just make your life better?
Passion drives our long hours and late nights supporting the Webflow community. Click the button to show your love.