Home › Forums › ACF PRO › Adding data into a repeater field. › Reply To: Adding data into a repeater field.
You need to organize your repeater entries into rows, with that done you can call update_field() using the array. Here’s an example of what you need to use as the value for update field when dealing with a repeater
array(
// each row of the repeater is a nested array
array(
// each element of the row array is a subfield value
'field_123456' => 'field 1 value',
'field_234567' => 'field 2 value',
), // end of first row
array(
// each element of the row array is a subfield value
'field_123456' => 'field 1 value',
'field_234567' => 'field 2 value',
), // end of second row
) // end of repeater
Let me know if that helps at all
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.