Columns Rotation NEW Bootstrap 5 theme
Column header rotation.
HIDE CODE
<?php // Get an instance of the Xcrud class $xcrud = Xcrud::get_instance(); // Set the table to work with $xcrud->table("orderdetails"); // Define which columns to display in the table $xcrud->columns("orderNumber,productCode,orderLineNumber,quantityOrdered,priceEach,total"); // Define which fields are available for data entry or editing $xcrud->fields("orderNumber,productCode,orderLineNumber,quantityOrdered,priceEach,total"); $xcrud->relation("officeCode","offices","officeCode","city"); // Hide the 'extension' field when the 'officeCode' IN '7,3,4'(London, NYC, Paris) $xcrud->set_column_rotation("orderNumber,productCode,orderLineNumber,quantityOrdered,priceEach,total","20"); $xcrud->readonly("total"); $xcrud->label("total","Total"); // Render the xcrud instance to display the table and form echo $xcrud->render(); ?>
Orderdetails
# | Ordernumber | Productcode | Orderlinenumber | Quantityordered | Priceeach | Total | |
---|---|---|---|---|---|---|---|
1 | 510101 | S24_2022 | 2 | 50 | 55.55 | 2777.5 | View Edit Remove |
2 | 10102 | S18_1342 | 2 | 390 | 95.55 | 0 | View Edit Remove |
3 | 10102 | S18_1367 | 1 | 41 | 43.13 | 0 | View Edit Remove |
4 | 10103 | S10_1949 | 11 | 26 | 214.3 | 0 | View Edit Remove |
5 | 10103 | S10_4962 | 4 | 42 | 119.67 | 0 | View Edit Remove |
6 | 10103 | S12_1666 | 8 | 40 | 121.64 | 0 | View Edit Remove |
7 | 10103 | S18_1097 | 10 | 35 | 94.5 | 0 | View Edit Remove |
8 | 10103 | S18_2432 | 2 | 22 | 58.34 | 0 | View Edit Remove |
9 | 10103 | S18_2949 | 12 | 27 | 92.19 | 0 | View Edit Remove |
10 | 10103 | S18_2957 | 14 | 35 | 61.84 | 0 | View Edit Remove |