Forums

Reset Search Filter in CCV5

bcouvin 04 Jul, 2017
Hello,

We have a search filter in different listing.
If one have a value for filter for this current listing, the other listing keeps the search value. We would like to reset each time we call the new listing.

We put this code in the Header box.
  <input type="search" name="srch" id="srch" value="" placeholder="Filter" style="float:right" class="form-control A" />
  <script type='text/javascript' > jQuery(document).ready(function(jQ){ jQ("#srch").val('');} ); </script>


This only clears the value of the input, but the listing keeps the list with filter. This should eval the "empty" value of the input?

What's wrong with that?

Thanks for you help
Bertrand
GreyHead 05 Jul, 2017
Hi Bertrand,

I believe that the problem here is that CCv5 stores the search criteria in the User session but does not link that value to a particular listing.

Max may have a fix for this - if he does not reply here, please use the Contact Us menu and link to this thread.

Bob
webcrea 25 Sep, 2017
Hi,

@bcouvin : you can add this.form.submit(); to your script to reload the list

I have problem also I would want to clear srch var just befaore to load the page with
$_SESSION["srch"] = '';
in "Pre display processing"

and nothing, the search filter is always active!

How can i desactivate srch on models

Thanks
This topic is locked and no more replies can be posted.