Field Grouping

[xcrud]

    $xcrud = Xcrud::get_instance();
    $xcrud->table('employees');
    $xcrud->table_name('Employees - Single click cell to edit! Save by Enter only');
    $xcrud->validation_required('lastName',2)
          ->validation_required('firstName',2)
          ->validation_required('jobTitle');
    $xcrud->validation_required('email');
    $xcrud->validation_pattern('email','email')
      ->validation_pattern('extension','alpha_numeric')
      ->validation_pattern('officeCode','natural');
    $xcrud->relation('officeCode','offices','officeCode','city');
    $xcrud->limit(10);
    $xcrud->group_by_columns('officeCode');
    //$xcrud->group_sum_columns('officeCode');     
    $xcrud->fields_inline('lastName,firstName,extension,email,officeCode,reportsTo,jobTitle');//set the fields to allow inline editing
    $xcrud->inline_edit_save('enter_only');// Can be 'enter_only' or 'button_only'  or 'enter_button_only'
    $xcrud->set_logging(true);
    echo $xcrud->render();

[/xcrud]

Employees – Single click cell to edit! Save by Enter only

# Lastname Firstname Extension Email Officecode Reportsto Jobtitle  
Boston (2 items)
1 Bown Anthony x5428 abow@classicmodelcars.com Boston 10575 Sales Manager (NA)
5 Pattersonsss Steve x43345 spatterson@classicmodelcars.com Boston 1143 Sales Rep
Tokyo (1 items)
2 Jennings Leslie x540 ljennings@classicmodelcars.com Tokyo 1143 Sales Rep
London (2 items)
3 Thompson Leslie x4065 lthompson@classicmodelcars.com London 1143 Sales Rep 3
4 Firrelli Julie x2173 jfirrelli@classicmodelcar.co London 1143 547845
Paris (4 items)
6 Tseng Foon Yue o224 ftseng@classicmodelcars.com Paris 1143 Sales Rep
8 Bondur Loui x6493 lbondur@classicmodelcars.com Paris 1102 Sales Rep
9 Hernandez Gerard x2028 ghernande@classicmodelcars.com Paris 1102 Sales Rep
10 Castillo Pamela x2759 pcastillo@classicmodelcars.com Paris 1102 Sales Rep
NYC (1 items)
7 Vanauf George N x4102 gvanauf@classicmodelcars.com NYC 1143 Sales Rep

  • 1
  • 2

Search