Skip Navigation

[Resolved] Filter values BETWEEN with Toolset

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

Problem: Can we add custom searches that filter values BETWEEN some values, instead of trying to fetch the EXACT value?

Solution: Simply choose "Between" as a comparison when you insert or edit the Filter.

Please see the attached screenshot: https://cdn.toolset.com/wp-content/uploads/2018/02/619324-Bildschirmfoto_2018_02_24_um_09.43.25.png?x44922

It will produce 2 fields, where you can add a minimum and maximum value to search for.

Note: This is not a "range slider". Range Sliders cannot be setup with Toolset and require Custom Code that we do not assist.

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 3 replies, has 2 voices.

Last updated by Beda 3 years, 6 months ago.

Assigned support staff: Beda.

Author
Posts
#619269

A user will be submitting a number (qty) of "Cows" they have available for sale in a cred form that will be published to a custom post type. How do I create a field in search that enabled searches to search within a number range?

For example I want to search all listings that have 100 cows - 400 cows for sale based on the number that was inputed in the cred form.

I searched yesterday for a tutorial on this but could find anything I could understand.

any help would be apreciated.

#619324
Bildschirmfoto 2018-02-24 um 09.43.25.png

Simply choose "Between" as a comparison when you insert or edit the Filter.

Please see the attached screenshot.

It will produce 2 fields, where you can add a minimum and maximum value to search for.

#619434

how would I achieve a range if the farmer is selling cows that have age ranges of 1 year - 10 years ( please note it is not a 1 number, farmers sell cattle in groups that have a ranging year for the group. Users need to be able to search for a ranges.

#619981

Range Searches are not possible natively with Toolset.

You can search between values, but the styling of the Search Input is not handled by Toolset, we provide only a limited set of HTML, CSS and JS, as you know this needs to be changed by the Web Developer using custom codes (CSS and HTML and JS)

You can set up the View Search with a "between" search as I instructed, and then apply the custom code, to make the search appear as a range, instead of 2 input fields.

There are some examples here:
https://toolset.com/forums/topic/using-the-between-filter-with-html-5-range-input/
https://toolset.com/forums/topic/how-to-create-an-advanced-search-range-slider-with-numeric-values/

Also, our Developers filed a feature request a while ago, but it's complex to implement:
https://toolset.com/forums/topic/filter-search-by-price-range-and-date-range/#post-387788

I added your voice to the request.