Home Forums ACF PRO Update Checkbox Group Reply To: Update Checkbox Group

  • I have a nested repeater with Days of the week followed by times
    Times is a repeater with in the Days of the week

    I am trying to update the subfield of locations (check box group)
    Screen SHot

    Basically all i want to do is turn off 1 location if my code calls for it. I am processing a front end form, and if the user checks this location then it will update the back end of this post.

    I use this to update a text field, but can not figure out how to get the check boxes unchecked using the same logic

    update_sub_field( array('date_and_time', $updatebooking['dtrow'], 'time', $updatebooking['timerow'], 'email'), $bookingemail , $updatebooking['postid'] );
    i ran a loop and can return the array of the locations

    if ( have_rows( ‘date_and_time’, $updatebooking[‘postid’] ) ) :
    while ( have_rows( ‘date_and_time’,$updatebooking[‘postid’] ) ) : the_row();

    if ( have_rows( ‘time’ ) ) :
    while ( have_rows( ‘time’ ) ) : the_row();
    $location_form_array = get_sub_field( ‘field_5d38d29aeb712’ );