Support

Account

Home Forums Add-ons Repeater Field Repeater update_field Reply To: Repeater update_field

  • 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.