Support

Account

Home Forums Backend Issues (wp-admin) Sort Repeater in BACK end, Where Data is Entered Reply To: Sort Repeater in BACK end, Where Data is Entered

  • hi, i think something like that should work

    add_filter('acf/load_value/name=repeater_termin', 'my_acf_load_value', 10, 3); //repeater_name
    function my_acf_load_value( $rows)
    {
     foreach( $rows as $key => $row ) {
      $thedate = $row['termin_date']; //datepicker_fieldname
      $column_id[ $key ] = strtotime($thedate);
     }
     array_multisort( $column_id, SORT_ASC, $rows );
     return $rows;
    }