Support

Account

Home Forums General Issues How to update_field for checkbox when value and label format is used Reply To: How to update_field for checkbox when value and label format is used

  • A checkbox field stores an array of values. This is the same no matter what the turn value is set to.

    Example – your choices are

    
    1 : One
    2 : Two
    3 : Three
    

    update the field to hold 1 check you use the value

    
    update_field('field_selector', array(1), $post_id);