Support

Account

Forum Replies Created

  • Awesome. Thanks John.

    I swear I used the search both on here and Google (among others).

    I really appreciate you finding this and posting the link.

  • Actually, the system shows the Display Name and the first/last name in the dropdown. But it’s sorted based on the Display Name.

    If there’s a way to not show the display name, and only the first/last name, that would be ideal.

  • Since I’ve now spent too much time trying to do the same thing, and finding this post with no update, I wanted to post a solution for others (or myself when I search again)

    Even though “value” is selected on the checkbox, the item is still stored as an array. As such, you do just a normal “get_field” as you’d be getting an array that returns “1”.

    We need the info contained in the array.

    $variable = get_field(‘acffield’);
    $var_value = $variable[‘value’];

    Now we can see the values;

    if ($var_value == “first”) {
    echo “do this”;
    }
    elseif ($var_value ==”second”) {
    echo “do that”;
    }

    Hopefully that gets someone else on the right track.

Viewing 3 posts - 1 through 3 (of 3 total)