Support

Account

Home Forums ACF PRO Adding data into a repeater field. Reply To: Adding data into a repeater field.

  • You need to organize your repeater entries into rows, with that done you can call update_field() using the array. Here’s an example of what you need to use as the value for update field when dealing with a repeater

    
    array(
      // each row of the repeater is a nested array
      array(
        // each element of the row array is a subfield value
        'field_123456' => 'field 1 value',
        'field_234567' => 'field 2 value',
      ), // end of first row
      array(
        // each element of the row array is a subfield value
        'field_123456' => 'field 1 value',
        'field_234567' => 'field 2 value',
      ), // end of second row
    ) // end of repeater
    

    Let me know if that helps at all