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

  • Here is my current code in functions.php:

    add_filter('acf/load_value/name=employee_schedule', 'my_acf_load_value', 10, 3); //repeater_name
    function my_acf_load_value( $rows)
    {
     foreach( $rows as $key => $row ) {
      $thename = $row['name']; //Field You Want To Sort By
      $column_id[ $key ] = strtotime($thename);
     }
     array_multisort( $column_id, SORT_ASC, $rows );
     return $rows;
    }