Labels and classes
Label() method will change all field names in all screens, column_name() - only grid headers.
HIDE CODE
<?php $xcrud = Xcrud::get_instance(); $xcrud->table('employees'); $xcrud->label('lastName','Surname'); $xcrud->label('firstName','Name'); $xcrud->label('officeCode','Office code')->label('reportsTo','Reports to')->label('jobTitle','Job title'); $xcrud->column_name('firstName', 'NaMe!'); // only column renaming $xcrud->column_class('extension','align-center font-bold'); // any classname // predefined classnames: align-left, align-right, align-center, font-bold, font-italic, text-underline echo $xcrud->render(); ?>
Employees
# | Surname | NaMe! | Extension | Office code | Reports to | Job title | ||
---|---|---|---|---|---|---|---|---|
1 | Fixter | Andy | x101 | afixter@classicmodelcars.com | 123 | 1088 | Sales Rep | View Edit Remove |
2 | Marsh | Peter | x102 | pmarsh@classicmodelcars.com | 6 | 1088 | Sales Rep | View Edit Remove |
3 | King | Tom | x103 | tking@classicmodelcars.com | 1089 | Sales Rep | View Edit Remove | |
4 | Nishi | Mami | x101 | mnishi@classicmodelcars.com | 1056 | Sales Rep | View Edit Remove | |
5 | Gerard | Martinm | x2312 | mgerard@classicmodelcars.com | 4 | 1102 | Sales Rep | View Edit Remove |
6 | aaa | aa | aa | aaaa | aaa | View Edit Remove | ||
7 | View Edit Remove | |||||||
8 | azert | berthe | totot.fr | berthe.azert@myoffice.com | 1 | ' | View Edit Remove | |
9 | 3432432kjkjkjk | pippo.dadmkmkma | 98898989 | pippo.dada.3432432@myoffice.com | 6 | View Edit Remove | ||
10 | View Edit Remove |