I’ve got the sub fields in the first repeater posting fine. But, I can’t quite figure out how to get the nested repeater working properly.
Here’s the code I have so far:
$event_field_key = ‘field_535e6b9ffe3da’;
$events = array(
‘start-date’ => $startDate,
‘end-date’ => $endDate,
‘notes’ => $_POST[‘p’.$p.’-notes’],
‘start-end-times’ => array(
‘start-time’ => ’09:00′, // would be dynamic
‘end-time’ => ’17:00′ // would be dynamic
update_field($event_field_key, $events, $post_id);
I’m not sure if I can just nest another array in there, or if I need to do something else.
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 ACF site is currently experiencing some issues.— Advanced Custom Fields (@wp_acf) September 21, 2022
We apologize for the inconvenience and we are working hard to get it back up and running as soon as possible.
© 2022 Advanced Custom Fields.