Gravatar for fcote@coveo.com

Question by fcote, Apr 9, 2015 11:16 AM

Default value of a facet when loading the search page

How do I preselect a specific value in a checkbox facet list on a landing page?

1 Reply
Gravatar for vseguin@coveo.com

Answer by Vincent Séguin, Apr 9, 2015 11:18 AM

Hi,

You would have to hook on the "afterInitialization" event on the page, find the facet by its id for instance and use the selectValue method to select the proper value. See here : https://developers.coveo.com/display/public/JsSearch/Facet+Component

Gravatar for dennis.augustine@techguilds.com

Comment by Dennis Augustine, Apr 9, 2015 12:04 PM

That worked. Thank you!

Ask a question