Buy Now
Sign in

Reset Search Filter in CCV5

bcouvin , July 04 at 13:45


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


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.


ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much



@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