Syntax for Checkboxes

BP Profile Search › Syntax for Checkboxes

  • Author
    Post
  • #9868 Reply
    Ace Suares
    Guest

    Hi 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)

    #9872 Reply
    andrea
    Plugin Author

    Hi 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.

    #9887 Reply
    Ace Suares
    Guest

    This 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=”&”]

    #9888 Reply
    Ace Suares
    Guest

    And at the same time, in Profile extended fields, “&” turns into “&”.
    No way out 🙂

    #9889 Reply
    Ace Suares
    Guest

    Is 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
    ace

    #9890 Reply
    andrea
    Plugin Author

    Hello 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.

Reply to: Syntax for Checkboxes
My Information