Forums: How to indicate Advanced Search has been applied to list - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to indicate Advanced Search has been applied to list

#1 User is offline   smez 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 19-March 15

Posted 10 January 2019 - 11:40 AM

Using Advanced Search on a list does not indicate that a search has been performed when the results are displayed (unless you also show the basic search on the list - which will then display the "Show all" cross icon). To make it clear that an advanced search has been applied use the following code snippet on the list page:

if($_SERVER['QUERY_STRING']!="")
{
// get query parameters
$urlQueries = explode("&",$_SERVER['QUERY_STRING']);
$urlParams = array();
foreach($urlQueries as $urlQuery)
 {
 $queryParts = explode("=",$urlQuery);
 $urlParams[] = $queryParts[0];
 }
// check for  advanced search parameter
if(in_array("q", $urlParams))
 echo "Displaying search results..";
}

0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users