Home › Forums › General Issues › Prepopulate repeater fields? › Reply To: Prepopulate repeater fields?
I really can’t help you when it comes to blocks. But I do know that fields are associated with the block and not the post ID.
This check in my original function tests to see if a value has already been set rather than depending on the post status
//...
if ($value !== NULL) {
// if the value is exactly NULL it means
// the field has never been updated
// we don't want to change fields that have already been edited
return $value;
}
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.