Support

Account

Home Forums General Issues [Checkbox] How to display all item as check uncheck Reply To: [Checkbox] How to display all item as check uncheck

  • 
    $values = get_field('checkbox_field_name');
    $field = get_field_object('checkbox_field_name');
    $choices = $field['choices'];
    foreach ($choices as $value => $label) {
        echo $label,': ';
        if (in_array($value, $values)) {
            echo 'checked';
        }
        echo '<br />';
    }