CMS Filter - update filter value via function call


I’m using CMS Filter for Search functionality on my website, and the only thing that filters CMS items is the text input field, where users type in their queries.

I’m wondering if there’s a JS function like updateResults("search-input", "value"), which will filter the results after being applied.


Hey @moorrr!

I’m not sure I understand your question. Do you have multiple filters on the page and only Search is working?

Do you want the users to submit the filters after they are done typing?

Could you share a read-only or live site link?

Hey @Support-Luis!

I have 2 text inputs - one is connected to FS CMS Filter, and another one is not.

The idea is to mirror the value from Input #1 (not connected to CMS filter) to Input #2 (Connected to CMS filter), and based on the mirrored text update the search results.

I’ve been trying to mirror the input value via jQuery $.val(), but CMS Filter ignores the change of $.val().

So I’m thinking if there’s a function that I can use to trigger the update of the search results to be displayed.
Something like updateFilter("by-title", "search-query").

P.S. unfortunately I can’t share the link due to NDA.

Thank you! :slight_smile:

Hey @moorrr, the issue with using jquery to mirror is that it does not trigger the input event. You can use our mirror attribute solution instead

@josephmukunga thank you so much! It worked :slight_smile: