Home › Forums › Add-ons › Repeater Field › Repeater Field not playing well using update_field() › Reply To: Repeater Field not playing well using update_field()
Hi @gregattack
Are you using the update_field on a $post which already has a value? Or are you saving this repeater value to a new $post?
If you are saving to a new post, then ACF will not know that it is a repeater field! To bypass this issue, please first read the update_field docs and pay attention to the $field_key parameter.
If you use the field_key, instead of the field_name, the repeater field will be detected and the data will be saved correctly.
Hope that helps.
Thanks
E
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.