Edit - Modal (Nested Tab) Bootstrap 4.5 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 | 27.06.2003 00:00:00 | 04.07.2003 00:00:00 | Shipped | NULL | 141 | View Edit Remove |
2 | 01.07.2003 00:00:00 | 10.07.2003 00:00:00 | Shipped | 250 | View Edit Remove | |
3 | 02.07.2003 00:00:00 | 12.07.2003 00:00:00 | Shipped | NULL | 124 | View Edit Remove |
4 | 04.07.2003 00:00:00 | 14.07.2003 00:00:00 | Shipped | Customer is interested in buying more Ferrari | 242 | View Edit Remove |
5 | 10.07.2003 00:00:00 | 20.07.2003 00:00:00 | Shipped | PROVA | 353 | View Edit Remove |
6 | 07.07.2003 00:00:00 | 16.07.2003 00:00:00 | Shipped | 496 | View Edit Remove | |
7 | 16.07.2003 00:00:00 | 23.07.2003 00:00:00 | Shipped | 282 | View Edit Remove | |
8 | 24.07.2003 00:00:00 | 02.08.2003 00:00:00 | Shipped | 161 | View Edit Remove | |
9 | 01.08.2003 00:00:00 | 09.08.2003 00:00:00 | Shipped | 334 | View Edit Remove | |
10 | 08.08.2003 00:00:00 | 16.08.2003 00:00:00 | Shipped | 124 | View Edit Remove |