Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tajenli

    (@tajenli)

    never mind, I figured out:

    $field = get_field_object(‘select_field’);
    $value = get_field(‘select_field’);
    $label = $field[‘choices’][ $value ];

    in short:

    <?php echo get_field_object(‘select_field’)[‘choices’][ get_field(‘select_field’) ]; ?>

    You copy and paste from documtantion…, but, what the hell it suppouse to be [choices] field? for me is not working with “choices” value

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get select field value & label in code’ is closed to new replies.