Forums › Forums › Search & Filter Pro › query string not updated
- This topic has 7 replies, 2 voices, and was last updated 7 years, 9 months ago by Anonymous.
-
Anonymous(Private) January 23, 2017 at 10:36 am #84541
HI,
I have multiple post meta filters with in the same search form.
There are two which I am having some issues with:
1-Region
2 -Country
I have custom fields with the countries for each region and with jQuery I hide and show the right one depending on which region the user selects. Everything works fine until after selecting one region and one country the user selects directly a different region. The query string is not reset and it keeps the country which was selected before causing an empty result.I will provide you with the url of the page if needed.
Hope you can help.
Many thanks
Anonymous(Private) January 23, 2017 at 12:19 pm #84577I am just hiding and showing the option field like so:
jQuery(document).ready(function($) {
var
regions = jQuery(‘.sf-field-post-meta-directory_region’).find(‘.sf-input-select’).val();
//console.log(regions);
if(regions !=””){
if(regions == “Africa”){
jQuery(‘.sf-field-post-meta-country_africa’).show();
}
if(regions == “Asia Pacific”){
jQuery(‘.sf-field-post-meta-country_asia’).show();
}
if(regions == “Central & South America”){
jQuery(‘.sf-field-post-meta-country_central_south_america’).show();
}
if(regions == “Europe”){
jQuery(‘.sf-field-post-meta-country_europe’).show();
}
if(regions == “Middle East”){
jQuery(‘.sf-field-post-meta-country_middle_east’).show();
}
if(regions == “North America”){
jQuery(‘.sf-field-post-meta-country_north_america’).show();
}
if(regions == “Australia & Oceania”){
jQuery(‘.sf-field-post-meta-country_australia_oceania’).show();
}
}});
-
AuthorPosts