Edit - Modal (Nested Tab) Semantic UI theme
Edit through a Modal Form with nested tab
HIDE CODE
<?php $xcrud = Xcrud::get_instance(); $xcrud->table('orders'); $xcrud->default_tab('Order info'); $xcrud->columns('orderDate,requiredDate,status,comments,customerNumber'); $xcrud->fields_arrange('orderDate,requiredDate,shippedDate','Dates',true); $xcrud->fields_arrange('status,customerNumber','Customer',true); $xcrud->fields_arrange('comments','Other Info',true); $orderdetails = $xcrud->nested_table('Order details','orderNumber','orderdetails','orderNumber'); // 2nd level $orderdetails->columns('productCode,quantityOrdered,priceEach'); $orderdetails->fields_arrange('productCode','Product',true); $orderdetails->fields_arrange('quantityOrdered,priceEach','Quantity',true); $orderdetails->fields('productCode,quantityOrdered,priceEach'); $orderdetails->default_tab('Detail information'); $customers = $xcrud->nested_table('Customers','customerNumber','customers','customerNumber'); // 2nd level 2 $customers->columns('customerName,city,country'); $products = $orderdetails->nested_table('Products','productCode','products','productCode'); // 3rd level $products->default_tab('Product details'); $products->is_edit_modal(true); $productLines = $products->nested_table('Product Lines','productLine','productlines','productLine'); // 4th level $xcrud->is_edit_modal(true); echo $xcrud->render(); ?>
Orders
# | Orderdate | Requireddate | Status | Comments | Customernumber | |
---|---|---|---|---|---|---|
1 | 14.11.2024 00:00:00 | 22.11.2024 00:00:00 | Shipped | 129 | View Edit Remove | |
2 | 24.03.2003 00:00:00 | 03.04.2003 00:00:00 | Shipped | Customer requested that ad materials (such as | 144 | View Edit Remove |
3 | 26.03.2003 00:00:00 | 02.04.2003 00:00:00 | Completed | 124 | View Edit Remove | |
4 | 04.04.2003 00:00:00 | 12.04.2003 00:00:00 | Shipped | 424 | View Edit Remove | |
5 | 11.04.2003 00:00:00 | 19.04.2003 00:00:00 | Shipped | 381 | View Edit Remove | |
6 | 16.04.2003 00:00:00 | 24.04.2003 00:00:00 | Shipped | 148 | View Edit Remove | |
7 | 21.04.2003 00:00:00 | 29.04.2003 00:00:00 | Shipped | Customer has worked with some of our vendors in | 216 | View Edit Remove |
8 | 28.04.2003 00:00:00 | 05.05.2003 00:00:00 | Shipped | 382 | View Edit Remove | |
9 | 29.04.2003 00:00:00 | 08.05.2003 00:00:00 | Shipped | 114 | View Edit Remove | |
10 | 07.05.2003 00:00:00 | 13.05.2003 00:00:00 | Shipped | 353 | View Edit Remove |