Skip Navigation

[Resolved] Show only available options for each input with filter exclusions

This support ticket is created 5 years, 1 month 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 4 replies, has 2 voices.

Last updated by larryL 5 years, 1 month ago.

Assisted by: Nigel.

Author
Posts
#1218375

I've created a product search view with custom filters. I've been asked to make it so the filters don't all behave dynamically when a selection is made. There are five filters aassociated with the search: Metal, Origin, Family, Weight, and Purity. What they want is that when a 'metal' is selected the options don't change in that filter (multi-select box) but the available options are reflected (as they should) across the other filter options (origin, family, etc...). That way they can go back and select other metals or 'mult-select' other metals if they choose (and the filter options change).

I tired to do this using checkboxes but when I selected more than one 'metal' all the other filter options went blank. I don't care which filter type I need to use (mult-select or checkboxes) for 'Metals' as long as I can accomplish the task.

Here is the filter code:

<div class="row">
<div class="form-group">
<label>[wpml-string context="wpv-views"]<span style="font-size: x-large;display: block;padding: 5px;">Metal</span>[/wpml-string]</label>
[wpv-control-postmeta field="metalType" type="multi-select" url_param="wpv-metaltype"]
</div>
<div class="form-group">
<label>[wpml-string context="wpv-views"]<span style="font-size: x-large;display: block;padding: 10px;">Origin</span>[/wpml-string]</label>
[wpv-control-postmeta field="origin" type="multi-select" url_param="wpv-origin"]
</div>
<div class="form-group">
<label>[wpml-string context="wpv-views"]<span style="font-size: x-large;display: block;padding: 10px;">Family</span>[/wpml-string]</label>
[wpv-control-postmeta field="GetProductCatalog_family" type="multi-select" url_param="wpv-getproductcatalog_family"]
</div>
<div class="form-group">
<label>[wpml-string context="wpv-views"]<span style="font-size: x-large;display: block;padding: 10px;">Weight</span>[/wpml-string]</label>
[wpv-control-postmeta field="weight" type="multi-select" url_param="wpv-weight"]
</div>
<div class="form-group">
<label>[wpml-string context="wpv-views"]<span style="font-size: x-large;display: block;padding: 10px;">Purity</span>[/wpml-string]</label>
[wpv-control-postmeta field="GetProductCatalog_purity" type="multi-select" url_param="wpv-getproductcatalog_purity"]
</div>
</div>

Thanks in advanced!

Larry

#1218807

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Screenshot 2019-03-21 at 10.10.24.png

Hi Larry

There is a setting in the View for whether the filters should update based upon or filter selections, or whether all options should always be shown.

It applies at the level of the View, so you can't have some filters display all options and others display dependently.

See the screenshot.

#1221094

Hi Nigel, thanks for the reply

This doesn't work.

For example....
If I select two options in the multi-select box it's shows no results because it 'thinks' I want results that include both options intesad of either option.

What I'm looking for is something closer to a facet filter that I can add/subtract results based upon user choices.

To I do need to beable to allow some of the filter's options to be dynamic.

Larry

#1221514

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Screenshot 2019-03-27 at 10.34.05.png

If I select two options in the multi-select box it's shows no results because it 'thinks' I want results that include both options intesad of either option.

That's a different issue.

If you cannot see the Query Filter section in your View then enable it by going to the Screen Options tab at the very top of the page.

For your multi-select field filter, change the comparison from "equal to" to "in", as shown in my screenshot.

#1222075

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.