hey,
i want to create "basic" and "advanced" search options on my site.
I have a taxonomy of "know-as" (writer, editor, researcher etc), which includes about 40 terms in it.
in the "basic" search, I want the user to be able to search only between 5 or 6 of these terms.
in the "advanced" search - all terms will be available.
i tried changing in the filter section to "any of the following" and chose the terms i wanted, but i think this only controls the results and not the search - because the search still shows me all terms.
btw - i have a code to allow users to change "any/all/none" within the search - and i want to keep it. got it with the kind help of Waqar here: https://toolset.com/forums/topic/allow-frontend-user-to-change-any-to-all-closed-by-mistake/
thanks!
Views doesn't offer any way of customising the filter controls added to a custom search, beyond what you can set in the GUI when inserting the filter.
There are no PHP filters, for example, that can be used to modify which terms are included in a taxonomy filter.
So if you want to show only a handful of a total of 40 terms then the only way to do so would be to use JavaScript to hide those you didn't want displayed.
And if you mean for users to be able to toggle whether they want to be able to choose from all terms rather than the sub-set of terms, you'd need to add a button to the search form and add a click event handler to that to toggle the visibility.
It's not really something that falls within the scope of support, as it means writing custom code to implement this.
You'll need to use the browser tools to examine the markup for the filter controls so that you can manually construct a jQuery selector for the 'basic' terms, which you can use to infer the advanced terms inputs, which you can then hide and set up the visibility toggle with.