Home Forums General Issues Convert field type radio to checkbox Reply To: Convert field type radio to checkbox

  • 1) Copy the choices value
    2) Change the field type
    3) Paste the choices value

    Do not change the field name

    ACF will detect this change in the admin and values will be preserved when the post is next edited.

    This may or may not be reflected on the front end of the site. A radio field holds a single value and a checkbox stores an array. You may need to do some checking and correction in your template, but you’ll need to test it.

    $value = get_field('your field name');
    if (!empty($value) && !is_array($value) {
      $value = array($value);