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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.