Hello,
I am updating a field in functions.php. I have a repeater which contains a group.
I feel like I am pretty close but cannot get it to work.
if( have_rows('myrepeater', $theuser) ){
while( have_rows('myrepeater', $theuser) ): the_row();
$theGroup = get_sub_field('theGroup');
$myFieldtoUpdate = $theGroup['myFieldinTheGroup'];
update_sub_field($myFieldtoUpdate, 'MEOW', $post_id);
endwhile;
}
The logic all works when outputting my fields but I am not sure how to update that sub_field within the group as shown. Does this make sense? I appreciate any insight anyone can give.
Thanks kindly.