- This topic has 1 reply, 2 voices, and was last updated 8 years, 10 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › visibility of reset button
Tagged: reset
Hi, I can’t find anything in the search.
Is it possible to have the reset button show only after submitting something? So if the Filter is not in use there is no reset button?
I tried to look for a css class in the wrapper like .searchandfilter-on (and if not in use .searchandfilter-off) so I could target the button via the wrapper class.
Hi
You could use PHP to see if the results are filtered, like this (change the ID number for yours):
global $searchandfilter;
$sf_current_query = $searchandfilter->get(1234)->current_query();
if (($sf_current_query->is_filtered())||($sf_current_query->get_search_term()!="")) {
// do something that identifies a search has been made (set some CSS, ...)
}
// your normal template code here