Skip Navigation

[Resolved] Problem with select fields being used as view filters

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.

This topic contains 2 replies, has 1 voice.

Last updated by lesleeM 1 year, 11 months ago.

Author
Posts
#2550851

We have set up a page with several search filters based on fields. Four of these filters are select field dropdowns. When the page loads initially, it shows ALL results unfiltered. When a user applies a filter, the results should only show the items containing that field option.

The problem we are seeing is that the four select field filters are defaulting to having the first item in the dropdown selected. So the search the user does is including the first item from each of those fields in the query even if that is not intended. The default field for these select filters should be ANY, not the first item. That way that field won't be used as a filter unless the user deliberately chooses one of the fields in the dropdown.

How can we get an option for ANY within these select field filter dropdowns?

You can see what I'm asking about here:

hidden link

#2551019

Nevermind, I think I figured this one out myself.

In here:

[wpv-control-postmeta type="select" field="wpcf-ride-contact" url_param="wpv-wpcf-ride-contact"]

I added default_label="Any" to make it

[wpv-control-postmeta type="select" field="wpcf-ride-contact" default_label="Any" url_param="wpv-wpcf-ride-contact"]

I think that works.

#2551021

My issue is resolved now. Thank you!