Home › Forums › Add-ons › Repeater Field › Repeater update_field › Reply To: Repeater update_field
I think that sub_field_1
and sub_field_2
in that example are supposed to represent the field names of the sub fields, but using the field keys is always the better option when using update_field(). The second example in the same code for flex fields better illustrates the way the value array needs to be for repeaters, with the exception of the acf_fc_layout
index. Repeaters and flex fields work the same way with the exception of the layout name.
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.