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

 

Example 1

 

Print Advanced search or Search panel parameters on the List page. To do so, insert a PHP code snippet with following code into a List page:

 

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);
echo " ".$srchObj->getFieldValue($field);
if ($srchObj->getSearchOption($field)=="Between") {
  echo " AND ".$srchObj->getSecondFieldValue($field);
 }
echo "<br>";
}

 

 

 

Example 2

 

Print basic search parameters on a List page:

 

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

 

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