Skip Navigation

[Gelöst] range filter for toolset

This support ticket is created vor 5 Jahren, 3 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Dieses Thema enthält 1 Antwort, hat 2 Stimmen.

Zuletzt aktualisiert von Beda vor 5 Jahren, 3 Monaten.

Assistiert von: Beda.

Author
Artikel
#1323545

Hi I have a view with some results from my own data type.
there is also a field with different integer values. Is there any chance to add to toolset views a filter that give the user the option to filter some ranges, like "Option 1: 0 - 500", "Option 2: 501-1000", "Option 3: 1001-1500", ...?
Best Regards Andreas

#1323575

Range filters (where you slide a handle to change ranges) are not possible with native Toolset Features.
You would have to add your voice to a feature request that asks for this, you can do this here:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

As of now, you could also follow some users' solutions in this forum, however, there is no unique, inhouse or recommended solution as of yet.
A few threads where you can find inspiration on the subject of custom coding such search, often with examples:
https://toolset.com/forums/topic/how-to-create-a-range-slider-filter-for-a-view/
https://toolset.com/forums/topic/range-slider-of-custom-field/
https://toolset.com/forums/topic/slider-value/

What you can do in Views, however, is let a Filter find items "between" 2 main values.
This can be set when adding New Filters in the Toolset Search and pagination section.
Inserting the filter offers an option in the Filter Comparison section (Using this comparison), where you can choose "between".
This then produces 2 inputs in the search, one for min and one for max.

But you cannot create several of those min/max fields, just one each.

Now, you could use that, to achieve your goal, by setting up such search for the field with a min and max input, as described above, and then producing a few HTML links, in the View, where you simply link to the page where the view is inserted and append the required URL parameters, like ?min=1&?max=500.

If clicked they would lead to the page with the view (or reload it, if inserted in the view itself) and since the links would pass the URL query parameters for the max and min inputs of the Custom Search, you could gradually load "ranges" of results by clicking each respective link (?min=1&?max=500, ?min=500&?max=1000 etc etc)

Please let me know if you'd need more assistance on any of these possible solutions.