Forums › Forums › Search & Filter Pro › Number Range not working as I would expect
- This topic has 15 replies, 2 voices, and was last updated 7 years, 8 months ago by
Anonymous.
-
Trevor(Private) January 22, 2018 at 11:08 am #153813
That is how I would expect the range to work.
The only way that is can work is if the ACF field is set to accept multiple values, and it contains 8 and all the values below it (1,2,3,4,5,6,7 and 8), or that you have a separate field that contains all these values. In ACF you can make a field calculated, so when a post has the field with 8 in saved, the calculated field could than fill with the numbers 1 thru 8.
Anonymous(Private) January 22, 2018 at 11:16 am #153815Hi Trevor, thanks for the reply.
It might be a setting I have not added right?
As its a user inputted number field, I can’t expect the users to add 1,2,3 etc – I think this would have to be automatic.
I am going to private post 2 screenshots below, 1.png is my settings in search and filter, 2.png is my setting for the ACF field.
Any ideas?
Trevor(Private) January 22, 2018 at 11:18 am #153820Your settings are correct. But our range matching does not do ‘equal or less than’, which is what you want, so my suggestion is the only way around this for now (and does not need the user to do anything). I believe the feature you want is on our ‘to do’ list.
Anonymous(Private) January 22, 2018 at 11:51 am #153831Thanks for the suggestion, I might have to look for another way around – I have looked through the top links for the search you provided but I really don’t understand how this works / I cant relate it to my issue.
Your solution is just a bit above my head I think..
: /
I will let you know here if I find another solution.
thanks
Anonymous(Private) January 22, 2018 at 1:14 pm #153859Hi,
I have almost got a solution which would be easy to implement and would mean that I wouldn’t have to change the way the user adds the data.
I have chosen the ‘Choice’ field rather than the number Range field in S&F.
The value I am after is for number of guests.
So, I have set my first choice in the dropdown to:
Value:
1&_sfm_numberofguests=2&_sfm_numberofguests=3&_sfm_numberofguests=4&_sfm_numberofguests=5&_sfm_numberofguests=6&_sfm_numberofguests7&_sfm_numberofguests=8&_sfm_numberofguests=9&_sfm_numberofguests=10&_sfm_numberofguests=11&_sfm_numberofguests=12
Label:
1
… If this passed through to the form intact it would work.
It would look like:
This would mean that the ‘1’ guest could potentially stay in a property of any size from 1 > 12.
Instead, when it gets passed through the form it looks like this:
… replacing ‘ & ‘ with ‘ %26 ‘ and replacing ‘ = ‘ with ‘ %3D ‘
… is there a way to pass this value through without it replacing the &’s and the =’s?
Cheers
Anonymous(Private) January 22, 2018 at 2:15 pm #153913HI Trevor.
I have just tried this and I have 3 posts with ACF number values of ‘4’, ‘8’ and ’12’
If I try any of the options with ‘Use Same Key’ unchecked, I get no results at all. I just get the url:
http://mywebsite.com/?sfid=1627&_sfm_bedrooms=0+24
As all the ‘number’ options in S&F are ‘between this and this’ and don’t seem to be working, I think my best option is what I have suggested above.
I am asking users ‘how many guests are there?’ so a number range isn’t really suitable.
Is there no way to achieve what I have suggested above?
… replacing ‘ & ‘ with ‘ %26 ‘ and replacing ‘ = ‘ with ‘ %3D ‘
Cheers
-
AuthorPosts