We have a bunch of filters, and we’re looking to try and preselect some of the filter items on page load based on a JS variable. So for instance we have this:
$('#college-search-filter .filter-element-group.group-2').append('<div class="filter-element hbcu"></div>');
search.addWidget(
instantsearch.widgets.toggle({
container: '#college-search-filter .hbcu',
attributeName: 'hbcu',
label: Drupal.t('HBCU'),
values: {
on: true,
},
autoHideContainer: false
})
);
How can we preset this filter and the results to already be filtered by this value?