简体   繁体   中英

Add a new row with data to an existing repeater in ACF

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 在此处输入图片说明

Should it not be

add_row('vacations', $row, $post_id);

Or is there a reason you are using

get_field_object()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM