# Trigger CMS Filter with a hidden Search field

**URL:** https://forum.finsweet.com/t/trigger-cms-filter-with-a-hidden-search-field/3677
**Category:** Attributes
**Tags:** cmsfilter
**Created:** [October 24, 2024, 12:05pm UTC](https://forum.finsweet.com/t/trigger-cms-filter-with-a-hidden-search-field/3677 "2024-10-24T12:05:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lenonguyen](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/lenonguyen/32/1249_2.png) [@lenonguyen](https://forum.finsweet.com/u/lenonguyen)
#### Post date: [October 24, 2024, 12:05pm UTC](https://forum.finsweet.com/t/trigger-cms-filter-with-a-hidden-search-field/3677/1 "2024-10-24T12:05:41Z")

</div>

Hi, is it possible to trigger the CMS Filter with a hidden Search field?

In my current setup, I have an input field with no attribute and a hidden search field. When someone adds value to the input field, the search field value will also get updated but it doesn’t trigger CMS Filter.

---

<div class="post-metadata">

### Author: ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)
#### Post date: [October 24, 2024, 3:43pm UTC](https://forum.finsweet.com/t/trigger-cms-filter-with-a-hidden-search-field/3677/2 "2024-10-24T15:43:33Z")

</div>

hey @lenonguyen! You can dispatch an event on the hidden field with the following JS line

```js
document.getElementById("ELEMENT_ID").dispatchEvent(new Event('input', {bubbles: true}));

```

This can be attached to an event listener for the visible input field set to fire on change or input.

If you need help please share a link and I will help you with the JS 😉
