Home › Forums › Add-ons › Repeater Field › Automatically creating sub_fields of repeater/flexible content depending on name › Reply To: Automatically creating sub_fields of repeater/flexible content depending on name
The reason that this is happening is that every time you run the code the sub fields get assigned a different field key
key' => 'field_' . uniqid(),
When ACF tries to get the value of the new field by the key there is no field value in the DB that using that’s field key. The field key must be the same every time the field is added.
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.