Home › Forums › Add-ons › Repeater Field › Initialize repeater field or programmatically find field_key › Reply To: Initialize repeater field or programmatically find field_key
Hi @Adam Ainsworth
If the field has not been saved to the post, then it is not possible for ACF to find the correct field object or field_key.
You will need to use pass in the field_key to the $field_name parameter of your function. Please note that the get_field_object function will work correctly using the field_key.
By using the field key, the field object will always be found.
I hope this helps
Cheers
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.