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!
🚨 The 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 18, 2023
© 2023 Advanced Custom Fields.