Hiding or changing hardcoded prompts for multiple search bars on a page

Hello,

We would like to add multiple search bars on a product-specific page (one in the header and one in the body). The client is wondering if the second bar in the body could be product-specific search where the users would only search for that product related questions and only see results related to that product. I’m thinking that we can use query rules (referrer page url criteria and filter action type) to achieve this, but wanted to do confirm the following:

  1. If the second bar that is intended to be product-specific search shows hardcoded prompts unrelated to the product like “locations near me” and users click on them, would they see “No results” since the query rule is filtering the results to only faqs and products?

  2. That being said, would we be able to hide the hardcoded prompts to avoid confusion?

Best,
Scarlett

Hi Scarlett,

Great question! I’m assuming your client is using these integration instructions to add multiple search bars.

We aren’t able to change hardcoded prompts based off of query rules, although this might be a future roadmap item. For this use case, if you have a unique class on the product search bar, you can use CSS to hide the prompts:

/* Hide Autocomplete */
.search-bar-container-3 .yxt-AutoComplete {
  display: none;
}

Keep in mind this would hide the hardcoded prompts and the popular queries on this search bar.

1 Like

Hi team, is this possible now? To serve up different hardcoded prompts on different urls governed by query rules?

Hi Emmy,

Great question - this is currently a feature request which you can track on our Ideas board here:

Feel free to comment on this with your use case or need!

Best,
Alyssa

1 Like

Thanks Alyssa! Will do.