Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Sample events > Appearance

Print search parameters on the List page

Scroll Prev Next More

 

If you want to print Advanced search or Search panel parameters on the List page, add PHP code snippet with following code:

 

global $strTableName;
$srchObj = SearchClause::getSearchObject($strTableName);
$fields = $srchObj->getSearchFields();
if(count($fields))
  echo "Search was completed."."<br>";
foreach ($fields as $field=>$value ) {
  echo $field.": " .$srchObj->getSearchOption($field);
  if ($srchObj->getSearchOption($field)=="Between") {
    echo " AND ".$srchObj->getSecondFieldValue($field);
  }
  echo " ".$srchObj->getFieldValue($field);
  echo "<br>";
}

 

Printing basic search parameters:

 

global $strTableName;
$srchObj = SearchClause::getSearchObject($strTableName);
$fields = $srchObj->getSearchFields();
if(count($fields))
  echo "Search was completed."."<br>";
echo $srchObj->_where["_simpleSrch"];

See also:

getSearchObject

getFieldValue

getSecondFieldValue

getSearchOption

SearchAPI

Insert code snippet

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software