Home › Forums › General Issues › add_row doesn't work the first time › Reply To: add_row doesn't work the first time
You need to use the field key.
When a field does not already exist and have a value for an ACF field then ACF is unable to figure out how to update the field.
This is true of all ACF functions for updating values. See the section “Updating via field key” on https://www.advancedcustomfields.com/resources/update_field/
In the case of a repeater all of the sub field values you are adding to the row should also use the field key.
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.