Custom directory search with commas
-
Hi Andrea,
Hope you’re well!
We’re trying to create a custom directory that will filter users of a specific gender who live in one of a number of selected locations. For example, we want to show all males who live in USA. Your info here has been really helpful, but we can’t work out how to filter based on the way we currently have our Location profile field formatted.
The profile field we have for Location (field = 92) is a drop-down select box with options like:
New York, USA
Texas, USA
California, USA
Melbourne, Australia
Sydney, Australia
etc.Because of the commas in the Location field options, the filtering doesn’t work. E.g. using:
[bps_directory field_3_="Male" field_92_one_of="New York, USA,Texas, USA,California, USA"]
results in only one user being shown (i.e. it essentially breaks).We understand the filtering would work if we removed the commas and changed our Location profile field options to:
New York USA
Texas USA
California USA
Melbourne Australia
Sydney Australia
etc.
but we’re sticklers for grammar and want to keep the commas there!Any ideas on how we can have our cake and eat it too? ??
Thanks.
- The topic ‘Custom directory search with commas’ is closed to new replies.