Skip Navigation

[Resolved] Reset button not showing

This thread is resolved. Here is a description of the problem and solution.

Problem: I have a custom search View where the reset button is not showing, and each input field is not affected by other selections.

Solution: Make sure the "show only available options for each input" setting is selected in the View's advanced settings for Custom Search.

Relevant Documentation:
https://toolset.com/documentation/user-guides/front-page-filters/advanced-settings-custom-search/

This support ticket is created 5 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 6 replies, has 2 voices.

Last updated by Christian Cox 5 years, 4 months ago.

Assisted by: Christian Cox.

Author
Posts
#1342151
no-items.PNG
front-end.PNG

In this ticket - https://toolset.com/forums/topic/no-items-reset-option/ I had an issue where

"I have a view which is filterable by parametric search when there are no items the No Items Found message is displayed but there is no way to reset the list.

Note - i have added the reset button which allows the list to reset after being filtered if there are items found."

The solution was to add the default reset button which i thought had fixed the issue but on further testing, it is still not working.

----

So basically see "front-end.png" this is how it looks unfiltered. I.e a map above the filter and a list underneath. When I filter, if nothing matches then the no items found message is displayed (there is no map or reet button) like the screenshot no items (see screenshot no-items.png)

---

Search and pagination code

<div class="allSites-filter filter-wrap hide-mob">[wpv-filter-start hide="false"]
[wpv-filter-controls]
<div class="row">
<div class="col-sm-12 form-group">
<div class="form-group FilterofSet"> Filter by: </div>
[wpv-control taxonomy="region-category" type="select" default_label="Region" url_param="wpv-region-category"] -
[wpv-control taxonomy="technology-category" type="select" default_label="Technology" url_param="wpv-technology-category"] -
[wpv-control taxonomy="market-category" type="select" default_label="Market" url_param="wpv-market-category"]
[wpv-filter-reset type="anchor"] <i class="fa fa-refresh" aria-hidden="true">
[wpv-filter-spinner spinner="hidden link"][/wpv-filter-spinner] </div>
[/wpv-filter-controls]
[wpv-filter-end] </div>
</div>

-----------------------------------

Loop Editor Code

[wpv-layout-start]
[wpv-items-found]
<div class="hide-mob location-map">
[wpv-map-render map_id="map-1" map_height="375" spiderfy="on"][/wpv-map-render]
</div>
<!-- wpv-loop-start -->
[wpv-filter-meta-html]
<table width="100%">
<tbody class="wpv-loop js-wpv-loop">
<wpv-loop>
<!--Map Marker-->
[wpv-map-marker map_id='map-1' marker_id='marker-[wpv-post-id]' marker_title='Hover' marker_field='wpcf-address-field']
<p style="font-size:16px;">[wpv-post-link] <i class="fa fa-angle-right" style="color:#2a7ac4;" aria-hidden="true"></p>
<i class="fa fa-phone-square" aria-hidden="true"> [types field='phone'][/types]<br />
<i class="fa fa-envelope" aria-hidden="true"> [types field='email'][/types]
[/wpv-map-marker]
<!--End Map Marker-->
<tr>
[wpv-post-body view_template="loop-item-in-sites-with-map"]
</tr>
</wpv-loop>
</tbody>
</table>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-pagination][wpv-pager-nav-links ul_class="pagination"][/wpv-pagination]
[wpv-layout-end]

#1342257

Hi, I see the main issue here is where you have placed the wpv-filter-meta-html shortcode. It should never be placed in the loop, because that means the filters will only be displayed when results are found. The wpv-filter-meta-html shortcode belongs in the Output Editor at the bottom of the View editor screen, not in the Loop Editor.

Then I can see you have placed a template in the loop:

[wpv-post-body view_template="loop-item-in-sites-with-map"]

I'm not able to see the contents of that template, so I can't offer much advice there.

#1342703
4.PNG
1.PNG
3.PNG
2.PNG

Hi Christian - thanks for getting back to me

I was actually advised to put the filter there in a previous ticket because I need the filter to go between the map and the list

Map
Filter
List.

I think this is ok because in theory there should be no instance where there are no items because i have set hide_empty to true. However this isn't working.

I have the same set up in production (I can send you link in private ticket) which works because there is no scenario when there will be no items showing. This is because i have set the filter to hide_empty="true"

So in Production...

1. I can select x-ray from the technology list (see 1.png)
2. I have a list of regions I can filter by (see 2.png)
3. However if I select the x-ray technology (i.e filter the list to only show posts that have been tagged as x-ray) there are no posts in the x-ray category which are tagged in the Asia and America regions
4. So when I hover over the region filter after I have selected x-ray only EMEA is available to select (see 3.png)

I've done the same in dev (see code below) but it is not working. I.e it is showing all the regions when i select x-ray (see 4.png)

[wpv-control taxonomy="technology-category" type="select" default_label="Technology" url_param="wpv-technology-category" hide_empty="true"]

Have I done something wrong or has the way you set up this changed?

Thanks!

#1343035
toolset-views-custom-search-settings-manual-1.png

In the dev site View editor, check to see if "show only available options for each input" is selected. You can find that setting in the Custom Search settings for this View. If not, select this option and test again.

#1345941

Hi Thanks Christian - can you tell me where I can find this setting. I don't seem to have this option within the view itself

#1345969

My issue is resolved now. Thank you!

#1346315

Okay great, it sounds like you were able to figure this out. For other visitors' reference, you can find the setting in the Search and Pagination panel of the View editor screen. If you cannot see the Search and Pagination editor panel, scroll to the top right corner of the screen and click "Screen Options". You can activate the Search and Pagination editor here. Next, choose "Let me choose individual settings manually" in the Search and Pagination editor, then scroll down to the bottom to find the configuration options discussed above.