# Linking homepage search to attributes filter page

**URL:** <https://forum.finsweet.com/t/linking-homepage-search-to-attributes-filter-page/2978>\
**Category:** Attributes\
**Tags:** cmsfilter\
**Created:** [May 31, 2024, 8:14am UTC](https://forum.finsweet.com/t/linking-homepage-search-to-attributes-filter-page/2978 "2024-05-31T08:14:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacob2](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@jacob2](https://forum.finsweet.com/u/jacob2)\
**Post date:** [May 31, 2024, 8:14am UTC](https://forum.finsweet.com/t/linking-homepage-search-to-attributes-filter-page/2978/1 "2024-05-31T08:14:53Z")

</div>

Hello, I’ve seen other people raise this topic but I can’t seem to repeat their solutions. [Search from homepage using filters and query params (?\*=)](https://forum.finsweet.com/t/search-from-homepage-using-filters-and-query-params/2700)

I have a homepage search that I would like to populate the CMS filter search field on a different page.

I’ve seen other people suggest custom JS to complete the search functionality, which I’ve copied and tweaked, but I can’t seem to get it to work for me.

Here is the read-only: [Webflow - You Recruitment](https://preview.webflow.com/preview/you-recruitment-staging?utm_medium=preview_link&utm_source=designer&utm_content=you-recruitment-staging&preview=10623837ea3a0dd7c4d6c036e7deab84&workflow=preview)

The homepage is trying to link to the Job Board page.

Can anyone tell me where I’m going wrong?

---

<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:** [May 31, 2024, 10:25am UTC](https://forum.finsweet.com/t/linking-homepage-search-to-attributes-filter-page/2978/2 "2024-05-31T10:25:40Z")

</div>

hey @jacob2! You have some different id on your elements and the code, this is why it fails.

Try using these selectors

```js
const userInput = document.getElementById('search-all-2');
const locationCategory = document.getElementById('location');
const form = document.getElementById('wf-form-Job-Search');

```

Let me know if you face any other issue 😉

---

<div class="post-metadata">

**Author:** ![jacob2](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@jacob2](https://forum.finsweet.com/u/jacob2)\
**Post date:** [May 31, 2024, 12:46pm UTC](https://forum.finsweet.com/t/linking-homepage-search-to-attributes-filter-page/2978/3 "2024-05-31T12:46:31Z")

</div>

Thanks @Support-Luis - what a silly mistake!

I’ve made that change and it still seems to be doing the same URL result: `https://you-recruitment-staging.webflow.io/jobs?search-all=term&location=` rather than the `*=term` we need.

I noticed other people using the Query Param attribute, I’m not sure it I need to apply those attributes anywhere?

---

<div class="post-metadata">

**Author:** ![jacob2](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@jacob2](https://forum.finsweet.com/u/jacob2)\
**Post date:** [May 31, 2024, 11:15pm UTC](https://forum.finsweet.com/t/linking-homepage-search-to-attributes-filter-page/2978/4 "2024-05-31T23:15:44Z")

</div>

I got this to work by moving the JS from the head to the body

---

<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:** [June 1, 2024, 9:08am UTC](https://forum.finsweet.com/t/linking-homepage-search-to-attributes-filter-page/2978/5 "2024-06-01T09:08:01Z")

</div>

Hey @jacob2! That’s great to hear!

I’ve also noticed you got the `*=` field working. Great 🙌
