Home › Forums › General Issues › Updating ACF Repeater that is a CLONE Programtically › Reply To: Updating ACF Repeater that is a CLONE Programtically
In order to use update_field() you would need to include all of the rows of the flex field as well as all of the rows of the repeater.
$flex_field = array(
array(
// each row of the flex field
'field_XXXXXXX' => array(
// nested repeater field
array (
// each row of the repeater
'field_YYYYY' => 'value'
)
)
)
);
This is not the way to add a row to a repeater nested in a flex field.
See add_sub_field_row() and/or update_sub_field().
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.