I’m attempting to use the select field with List Filter and I’m running into trouble. No matter where I put the fs-list-field in the select element, I don’t seem to get the filter to work properly. Am I just wrong in assuming that you can filter using select?
You can definitely filter using select elements! The issue with the fs-list-field attribute not working on select elements is likely due to a setup configuration.
There are several ways to use select elements with List Filter:
For a basic dropdown filter, add fs-list-field="IDENTIFIER" directly to the select element:
Place the select inside a form with fs-list-element="filters"
Each option’s value should exactly match your CMS field values
The IDENTIFIER should match the one used in your collection items
If you’re populating your select from CMS data, you might be facing a common issue where:
The collection list populating the select has fs-list-element="list"
This makes List Filter treat it as another list to filter
To fix this, add fs-list-instance="IDENTIFIER" to differentiate between the collection list for options and the one you want to filter.
If you want to use List Filter + List Select here is the setup:
Thanks for the reply! The reason I’m using a dropdown is because I also want to use the Custom Select component/feature from Finsweet to have nicer looking select items. So essentially I want to combine all three. List Filter, Select List, and Custom Form Select. Is this possible?
This is the actual page I want to build. I want the shed size dropdown to filter the pricing info below. But when I select a shed size, it comes up with no results for some reason. I know there are results as I see them in the CMS.
I’ve got it to a point where everything is working except the filter. I think it has something to do with instances, but I’m sort of confused on how instances work. I’ve tried to watch vids on it, but still not sure what’s wrong.
The problem is my filter doesn’t work. Everything else works. I think it has to do with instances. If you could look at my site and see where I might have gone wrong. my problem doesn’t seem to be in the dropdown but in the filter setup
To make the filters work, add fs-list-instance="feed" (same as in your main list element) to your form element. This is to make sure that the form filters and the list are part of the same instance.
Then, if you want only one item to be shown, don’t use Limit Items (Limit Items restricts how many CMS items Webflow renders into the DOM); instead, try this approach:
Enable Webflow’s Paginate Items option and set it to 1 item per page
Add fs-list-load="more" and fs-list-loadcount="1" to your main list
If you want, you can hide the pagination elements with display:none