Tell us what you are trying to do?
I want to search posts by 2 taxonomies the first using a select box, then search all selected posts using a text search on 2nd taxonomy.
The text search alone appears to work, but I cant use the Select box to select posts from 1st taxonomy.
this is what I have:
[wpv-filter-start hide="false"]
[wpv-filter-controls]
<div class="form-group">
<label>[wpml-string context="wpv-views"]Systems[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="system" type="select" default_label="Select all or click to specify" url_param="wpv-system"]
<label>[wpml-string context="wpv-views"]Search Medicinal Complaints & Other Uses[/wpml-string]</label>
[wpv-filter-search-box placeholder="Enter terms you wish to search for eg. cough" output="bootstrap"]
</div>
[wpv-filter-submit name="Search" type="button" output="bootstrap"]
[/wpv-filter-controls]
[wpv-filter-end]
Is there any documentation that you are following?
https://toolset.com/documentation/user-guides/front-page-filters/?utm_source=viewsplugin&utm_campaign=views&utm_medium=edit-view-create-custom-search-helpbox&utm_term=Creating%20custom%20searches%20with%20Views
Is there a similar example that we can see?
What is the link to your site?
hidden link
Hello,
Thanks for the details, I have tried it in the URL you mentioned above, but I don't see the same problem:
cant use the Select box to select posts from 1st taxonomy.
It works fine, see screenshot system-tax.JPG
Is this problem resolved?
Hi Luo, Thanks for taking a look at this.
No it's not solved - firstly the Select box should show a list of around 30 biological systems from which I can select 1 system or all systems if I don't make a selection.
After selecting 1 or all systems, I want to enter complaint/use terms for the text search and return all posts that satisfy the system and complaint/terms specified.
Can be I'm missing a reset/clear button, but it's not behaving as I want.
Thanks for your help
David
I've added a Reset button, problem is pressing it loads all the posts into results section.
Clicking Reset button needs to return an empty set, this should also happen on the initial page load.
I only want to see the returned posts when I click Search button.
Thanks for your help
David
ok , I understand that the reset button only clears the filters and therefore also loads all the posts without the filters. I have over 1200 posts that I search so loading them all is very time consuming.
I want the search filters - a select dropdown and a text search - and the results on the same page.
Is there a javascript function to clear the filters and all results, so that I have a blank search form?
Would it be possible to include a value in the select dropdown that doesn't return any results?
Thanks for your help
David
Thanks for the details.
Q1) firstly the Select box should show a list of around 30 biological systems
Please edit the post view (ID: 11949)
In section "Custom Search Settings", enable option "Let me choose individual settings manually", enable option "Always show all values for inputs".
If you don't find section "Custom Search Settings", please click link "Screen Options", there is an option "Custom Search Settings".
Q2) Is there a javascript function to clear the filters and all results, so that I have a blank search form?
No, there isn't such kind of built-in feature, I suggest you try with one of below options:
1) Add pagination into your view:
https://toolset.com/documentation/user-guides/views-pagination/
2) Split the search form and search result into two different pages, see our document:
https://toolset.com/documentation/user-guides/front-page-filters/#4-1-adding-the-custom-search-form-to-a-page-or-widget
section "4.1. Adding the custom search form to a page or widget"
Q3) Would it be possible to include a value in the select dropdown that doesn't return any results?
Same as above Q2), there isn't such kind of built-in feature.
My issue is not resolved now. Thank you!