I’m struggling with a client custom request involving Finsweet CMS Filter, CMS Nest and CMS Select.
Everything works fine except this.
As you see in the read-only link I have two sections: the first is for the regions (of Italy) and the second is for the relative provinces.
I need the second filter, the provinces one, to display only the provinces relative to the region selected in the first one.
FS doesn’t support cascading filters, and it’s one of my top requests for their upcoming new version.
What I do when clients need this is custom code a separate filter for the region-province selector, and then setup the FS filter so that it uses province only.
Thank you for the answer. Do you know a way to replicate the component as you said? Maybe a tutorial. Or maybe you know other tools (not Finsweet attributes)?
Currently, I’m trying to achieve this with the help of GPT because I’m not very good at javascript.
I don’t know of any tutorials, it’s not a difficult build but I always build these custom. If it’s important to your project, and you need a dev to help, drop me a message and I’ll share my details.
Yes, it’s possible to achieve this functionality using Finsweet CMS Filter, CMS Nest, and CMS Select. To make the provinces filter display only the provinces related to the selected region, you’ll need to use dynamic filtering.
You can set up a CMS Nest inside the provinces filter, where the options are filtered based on the selected region from the first filter. You can use custom JavaScript to listen for changes in the first filter (regions), and then update the provinces options accordingly.
Ensure that the province entries in your CMS have a reference to the region they belong to, and then use that relationship to filter the provinces dynamically. Finsweet’s documentation on dynamic filtering and Nesting should provide more details on how to implement this.
To make the provinces dropdown update based on the region selected, you need to link each province to its corresponding region in your CMS. Use the CMS Select for the region filter and then set up CMS Filter or CMS Nest on the provinces to show only those related to the selected region. If needed, you can add a simple JavaScript function to update the provinces dynamically whenever a region is selected. This setup ensures a smooth and responsive filtering experience where the options in the provinces dropdown are always relevant to the chosen region.