BP Profile Search › Syntax for Checkboxes
-
AuthorPost
-
Ace Suares
GuestHi Andrea,
We have Checkboxes in field 84 which can contain: ‘abcd’, ‘zyx & pqr’ and ‘klm/nop’
I tried [bps_directory field_84_match_any=”abcd”] and that works.
But [bps_directory field_84_match_any=”zyx & pqr”] does not work, probably because of the &. What is the correct syntax? (version 4.9.8)andrea
Plugin AuthorHi Ace,
Field values containing the & work fine for me.
I suggest you double check the field definition in Users -> Profile Fields and make sure the spelling of the option is correct (number of blank characters, leading or trailing spaces, …). For instance, instead of:
[bps_directory field_84_match_any="zyx & pqr"]you might need:
[bps_directory field_84_match_any="zyx & pqr "]if the option contains a trailing space.
Please let me know what you find out.
Ace Suares
GuestThis what happens:
I put in this:
[bps_directory template=”members/index-ekvd” field_84_match_any=”&”]
But WordPress/Divi/TinyMCE turns it into this:
[bps_directory template=”members/index-ekvd” field_84_match_any=”&”]
Ace Suares
GuestAnd at the same time, in Profile extended fields, “&” turns into “&”.
No way out 🙂Ace Suares
GuestIs there a wildcard possible in the match_any search?
Then I could do “xyz%” and it would find “xyz & pqr”
Or even nicer if it was a regex “xyz ?+ pqr”
Cheers
aceandrea
Plugin AuthorHello Ace,
A search with wildcards is available with text fields only, but you can make sure the & is entered correctly if you edit your page using the Text editor tab, instead of the Visual tab.
If that doesn’t work either, I’ll add a workaround in BP Profile Search.
-
AuthorPost