Forums › Forums › Search & Filter Pro › Filter for a value that´s expressed as a fraction
- This topic has 5 replies, 2 voices, and was last updated 3 years, 11 months ago by Trevor.
-
Anonymous(Private) November 17, 2020 at 10:34 pm #266823
I´m trying to set-up a search form on custom posts using ACF.
I have everything figured out except a tiny issue:
I have a field for which the values are expressed as a fraction in numbers (i.e.: 1/10; 1/20; 1/70; etc.).
I wanted to include a filter for this in the search form. I chose Number input type, Range – Slider (screenshot here: https://prnt.sc/vl2pn1).
I´m not able to make it work. The search form filter shows a slider with only one value which is “1”.
Can you give me some hint please on how I should go about this particular filter?
Thanks,Trevor(Private) November 18, 2020 at 9:27 am #266856Databases do not see fractions, such as those you mention, as numbers. The only valid characters allowed in a database number field are
.0123456789
and\
is not allowed. Thus, the values (fractions) are being treated as text. Other than entering the fractions as decimals, I am not aware of a solution that could allow a slider. -
AuthorPosts