Support

Account

Home Forums Add-ons Repeater Field Programmatically update row index number for rows of a repeater field Reply To: Programmatically update row index number for rows of a repeater field

  • The only way to change to order of the rows from a coding standpoint is to get the entire repeater as an array, reorganize the array and then re-save the entire repeater. the index of a row is only the order of that row in the array.

    
    $repeater = array(
      array(
        // row array
        'field_1' => 'value',
        'field_2' => 'value'
      ),
      array(
        // row array
        'field_1' => 'value',
        'field_2' => 'value'
      )
    )