Forums › Forums › Search & Filter Pro › number based searching
- This topic has 13 replies, 2 voices, and was last updated 7 years, 4 months ago by Trevor.
-
Anonymous(Private) June 27, 2017 at 7:21 pm #117074
Hi, I am using search and filter with Advanced Custom Fields Pro (ACF)
one of my fields is ‘number of bedrooms’ I have many properties with various numbers and am finding it tricky getting the right logic for the search fields.
At the moment, its just in as is so if you search for 3 bedrooms, it shows properties with 3 bedrooms. Really, I need this to be 3 and above so if I wwere to select 3, it would also show the 4 properties, 5 properties, 6 properties etc…
I just cant figure out how to set this up right.
Trevor(Private) June 28, 2017 at 9:24 am #117153Because we do not have a search operator for numeric fields, in this case
>=
would be needed, you would need to have a second ACF field that has 3, 4, 5 AND 6 in it (etc) as a multi select field (an array), and search in that instead. I am hoping that this functionality will be in the forthcoming V3Anonymous(Private) June 28, 2017 at 9:35 am #117168Hi Trevor, I notice that when I change the post meta field to a number dropdown the search comes out like something like this this:
website.com/?sfid=132396&_sfm_bedrooms=2+4
… the 2+4 part is obviuosly an inclusion of all 2,3 and 4 bedroom properties as it returns all of these.
I tried to do this through manual values in a manual drop down list eg:
label: 1, Value: 1
label: 2, Value: 1+2
label: 3, Value: 1+3
label: 4, Value: 1+4… but as soon as I take it out of the ‘number’ option in the post meta these urls no longer work. There isnt many options in the ‘number’ section and certainly nothing that suits my criteria.
I am a little confused about your explanation above, are you saying the only way to do this is to add other meta values to the posts? If so this will be impossible as users setup their own properties, I couldnt expect them to add extra data, it is a simple question for them: how many bedrooms are there? are there any other ways around this?
Trevor(Private) June 29, 2017 at 5:19 pm #117736My bad. It looks like you answered that, so all we need to do is figure how to encode this, as you already tried, in the form field settings.
Are you able to send me admin logins for the site so that I can investigate this in the form setup? Please use a Private Reply.
-
AuthorPosts