Hi team,
I have 2 selects acting as a from/to range filter using CMS Filter. Both selects contain the same options (1, 2, 3, up to 10). When the user selects the same option for both selects, it displays items as if only the ‘from’ was selected.
For my example, the filter in question is number of bedrooms for a property. When the user selects min 2 bedrooms and max 2 bedrooms, the filter displays properties with min 2 bedrooms (2, 3, 4, 5+ bedrooms etc) instead of only properties with specifically 2 bedrooms, no more no less.
Now for the longest time I have gotten around this by setting slightly different option values on the max select, for example 2 bedrooms would have a value of 2.2, 3 bedrooms would be 3.3 etc., but I’m now looking for a decent solution.
Quick note: Im displaying query params - when you select a min value, you’ll get ‘beds=2’, if you select a max value you’ll get ‘beds=%2C2’, if you put both min and max to 2 you’ll get ‘beds=2’ - the same as if you were only selecting a min value. If you set both selects and refresh the page, the page will reload with only the min selected. Maybe this has something to do with it.
In an ideal world, if both min and max were the same value, the url would display ‘beds=2’, because that makes the most logical sense to the user.
Funny thing is, I can’t find a single topic bringing this issue up. I would have assumed more people would have come across this.
On the same page, have a play around with the other range filters I have, it should give you a good idea on what the issue is.
Some help here would be great!
Cheers