Hi everyone,
I am trying to pre-populate a repeater field, that is located inside a flexible content field, and need help with figuring out what I am doing wrong.
I tried add_filter('acf/load_value/name=competitor_table', 'afc_load_my_repeater_value', 10, 3);
and add_filter('acf/load_value/key=field_63995a8ada6b0', 'afc_load_my_repeater_value', 10, 3);
but it only loads the values after I save and refresh the page.
I also tried changing the priority to lower or higher, but still no luck.
My code example that will not work:
add_filter('acf/load_value/name=competitor_table', 'afc_load_my_repeater_value', 1, 3);
function afc_load_my_repeater_value($value, $post_id, $field)
{
$value = array();
$value[] = array(
'field_63995a8ada6b0' => 'Same day physician access',
'field_63995accda6b1' => 'yes',
'field_63995b10da6b3' => 'yes',
'field_63995b17da6b4' => 'no'
);
$value[] = array(
'field_63995a8ada6b0' => 'Physical card copy',
'field_63995accda6b1' => 'yes',
'field_63995b10da6b3' => 'yes',
'field_63995b17da6b4' => 'yes'
);
return $value;
}