You are here:  » Reset filter button


Reset filter button

Submitted by wesse249 on Sun, 2015-08-30 20:13 in

Hello David,

Is it possible to place a reset filter button near the filter results button?

I use by all field print "";

Thanks.

JR

Submitted by support on Mon, 2015-08-31 10:12

Hello Jan,

Sure - in html/searchfilters.php, you can simply create a link to the current query without any filter parameters as a "Reset" link - have a go with the following code:

<?php
  
if ($priceWhere)
  {
    print 
"<p><a href='".$config_baseHREF."search.php?q=".urlencode($q)."'>Remove Filters</a</p>";
  }
?>

Using the IF construct with $priceWhere means the link will only be displayed if filters are in effect.

Cheers,
David.
--
PriceTapestry.com