Home › Forums › General Issues › Prepopulate repeater fields? › Reply To: Prepopulate repeater fields?
First you need to add a hook to call your filter
add_filter('acf/load_value/name=YOUR-REPEATER-FIELD-NAME', 'my_acf_load_value', 20, 3);
In the function above you replace ‘field_name_1’ with the name of the first sub field and add the value for that field. You do this for each sub field. If you want to add a second row you add another nested array for that row’s values.
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.