Low Search is front-end agnostic. That is, it doesn't really matter what input fields you use in the search form on the front-end, as long as you name them correctly, so Low Search understands them. Input fields always relate to tag parameters: the input name should be identical to the parameter you would use in the Results tag.
In the case of ranges, you can either use a single parameter (using the from and to values 1 to 10 in this example):
range:field_name="1;10"
Or split it in two parameters:
range-from:field_name="1" range-to:field_name="10"
The field_name
is the field you're targeting for the range.
Translated to html input elements, this is:
<input name="range:field_name" value="1;10">
...and...
<input name="range-from:field_name" value="1">
<input name="range-to:field_name" value="10">
You can then get the posted values of these parameters using the parameter name, prefixed with low_search_
, so:
{low_search_range:field_name}
{low_search_range-from:field_name}
{low_search_range-to:field_name}
You don't need to use <input>
s per se; you could also use <select>
s. As long as the name
attribute equals the parameter name.
So, as long as you make sure the names and values are as they should be, you can use any input element you like. How you implement it, is up to you.