BuddyDev

Search

Conditional Profile Fields not working with field “country selector”

  • Participant
    Level: Initiated
    Posts: 1
    Fab on #51942

    Hi, I wanted to use the plugin with a field type “country selector” but I was not able to make it working.

    Initially I set the condition “show field1 if countries = “Italy”, “France”, “Germany” but it did not work. I also tested with the semicolon (“Italy”; “France”; “Germany”) and without the quotes (Italy, France, Germany), always with the same result.

    Finally I tested with a single country and it neither work again.

    Someone can help me please?
    Thank you

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #51964

    Hi Fab,
    Welcome to BuddyDev support.

    Are you using our xprofile custom field types plugin? If yes, you will need to use the 2 letter country code.

    Here is the list of country codes.
    https://github.com/buddydev/bp-xprofile-custom-field-types/blob/master/src/field-types/class-field-type-country.php#L221

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 1
    Fab on #51973

    Thank you! It worked with a single value using only the country code, like IT without quotes.
    What if I’ve to insert a list of countries? I’ve to use the comma, semicolon, space or what between the different country codes?

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #52105

    Hi Fab,
    I am sorry, the plugin is not aware are of country field and treats it like a text field. That’s why the single value is working.

    At the moment, I am unable to suggest any workaround for this.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved