Reputation: 2595
i am trying to add a new row with data to an existing repeater in acf.There is no error but this code unable to insert data in database. this is what i have tried
$row = array(
'vacation_from_date' => '20/10/2017',
'vacation_to_date' => '25/10/2017',
);
$field = get_field_object('vacations','user_' . $user_id);
add_row($field['key'], $row);
here is my screenshot for wp-admin
Upvotes: 2
Views: 1589
Reputation: 1422
Should it not be
add_row('vacations', $row, $post_id);
Or is there a reason you are using
get_field_object()
Upvotes: 3