Support

Account

Home Forums Backend Issues (wp-admin) Repeater field returning repeater count until post is saved via admin screen Reply To: Repeater field returning repeater count until post is saved via admin screen

  • Hi James –

    I’m using the outside have_row() version of update_sub_field.

    
    update_sub_field( array( 'field_559eee03f62d2', intval( $field['data']['group'] )+1, 'field_559eee10f62d3' ), $field['data']['term_id'], $submission_id );
    update_sub_field( array( 'field_559eee03f62d2', intval( $field['data']['group'] )+1, 'field_559eee26f62d4' ), ucfirst( $field['value'] ), $submission_id );
                                
    

    If I convert over to update_field() than I have to rewrite the code to make the whole array first, then send to update field all at once, correct? (A lot of investment in that.)

    The very odd thing is, when the admin page loads, the fields are set correctly, but when trying to get the values in code, only the number of rows is returned and have_rows() returns false. Seems like a bug with update_sub_field()

    I’d also like to add that this code was working previously and I wonder if an update introduced a bug. Unfortunately this code is only run quarterly. I remember it working fine when I launched it 6-9 months ago. But now there are problems.