Is not there any code for resetting filter search form in search-sidebar.php?
I add clear and reset button and use this code for search-sidebar.php form:
$(document).ready(function()
{
$('button.reset').on('click', function()
{
$("form.nocsrf").trigger("reset");
});
$('button.clear').on('click', function()
{
$('form.nocsrf').find('input:text, input:password, select, textarea').val('');
$('form.nocsrf').find('input:radio, input:checkbox').prop('checked', false);
});
});
but did not work.
1-why html & javascript codes could not reset this form?
2-I write this code for resetting form:
<a class="resetform" href="<?php echo osc_base_url($with_index = true)."?page=search"."&sRegion=".$_GET['sRegion'];if ($_GET['sCity']) echo "&sCity=".trim($_GET['sCity']);if ($_GET['sCategory']) echo "&sCategory=".trim($_GET['sCategory']); ?>">
reset</a>
but it need requesting a url for reseting and cause server resource using.
Please help.
Thanks