Support

Account

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

  • the array for your repeater should look like this

    
    $value = array(
      // nested for each row
      array(
        // field key => value pairs
        'field_59606dc9525dc' => 'value for row 1'
      ),
      array(
        // field key => value pairs
        'field_59606dc9525dc' => 'value for row 2'
      ),
    );
    

    I think that this will do it

    
    foreach ($wpbb_xml_params->features->children() as $second_gen) {
        $feature_value = (string)$second_gen;
        $value[] = array( 'field_59606dc9525dc' => $feature_value );
    }
    update_field( 'field_59606db8525db', $value, $wpbb_job_post_id );