The solution is a bit messy and filled with a bunch of my classes functionality that won’t make much sense.
The gist is that:
What I did was check the field type against ‘repeater’ and returned my custom database value count. At the top of the hook I checked if the $field[‘parent’] was empty, if not I used
get_field_object( $field['parent'], $post_id, false, false ) to get the parent field name that the subfield are prefixed with.
Once I returned the count to the repeater and stripped the parent name prefix off the subfields I was able to prepopulate the repeater with my custom table data. I have no idea if this will be helpful to anyone but at least it’s no longer a niche issue on the forums here.
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!