- This topic has 13 replies, 2 voices, and was last updated 8 years, 2 months ago by .
Forums › Forums › Search & Filter Pro › Problems as soon as ajax is activated
Tagged: ajax
Otherwise you would have to dig in and edit the template code to add a classname somewhere appropriate. You CAN use PHP to detect if a search has been made, like this (change the ID number to match your form – the get_search_term part is only needed if you have a text search field):
global $searchandfilter;
$sf_current_query = $searchandfilter->get(1234)->current_query();
if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
// code if no search made
} else {
// code if search made
}