# Query params doesn't work with ComboBox

**URL:** <https://forum.finsweet.com/t/query-params-doesnt-work-with-combobox/3569>\
**Category:** Attributes\
**Tags:** combobox\
**Created:** [October 7, 2024, 12:43pm UTC](https://forum.finsweet.com/t/query-params-doesnt-work-with-combobox/3569 "2024-10-07T12:43:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![formation.less.is.co](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/formation.less.is.co/32/827_2.png) [@formation.less.is.co](https://forum.finsweet.com/u/formation.less.is.co)\
**Post date:** [October 7, 2024, 12:43pm UTC](https://forum.finsweet.com/t/query-params-doesnt-work-with-combobox/3569/1 "2024-10-07T12:43:07Z")

</div>

Hello,

I’m using Attributes CMS Filter + Combo Box.

My problem start when i want to share a URL with query params inside.

When i copy-paste the link with query params of CMS filter, it work and apply the 250.000€’s filter (live example - DM) 🙂

Then when i copy-paste the link with the query param of Combo Box, it doesn’t apply the “Alicante” filter to Combo Box’s field (live example - DM) ☹

How could i solve this ?

Thanks a lot

---

<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 8, 2024, 8:38am UTC](https://forum.finsweet.com/t/query-params-doesnt-work-with-combobox/3569/2 "2024-10-08T08:38:34Z")

</div>

Hey @formation.less.is.co! This is because you have multiple filter field identifiers for the combo box input. We can solve this with some JS to extract the query params and add them to the input Can you test this code?

```js
<script>
  window.fsAttributes = window.fsAttributes || [];
  window.fsAttributes.push([
    'cmsfilter',
    (filterInstances) => {
      console.log('cmsfilter Successfully loaded!');

      const comboboxInput = document.querySelector('[fs-cmsfilter-field="ville, region, search"]');
      const urlParams = new URLSearchParams(window.location.search);
      const ville = urlParams.get('ville');

      if (ville) {
        comboboxInput.value = ville;
        comboboxInput.dispatchEvent(new Event('input', { bubbles: true }));
      }
    },
  ]);
</script>

```

Let me know how it goes!

---

<div class="post-metadata">

**Author:** ![formation.less.is.co](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/formation.less.is.co/32/827_2.png) [@formation.less.is.co](https://forum.finsweet.com/u/formation.less.is.co)\
**Post date:** [October 8, 2024, 10:05am UTC](https://forum.finsweet.com/t/query-params-doesnt-work-with-combobox/3569/3 "2024-10-08T10:05:18Z")

</div>

Thanks @Support-Luis,

I will not use the script but you point me the solution telling me that i had multiple field identifiers in the combo box.  
I merge all fields in one and it work perfectly.

thanks.
