DEMO SITE v1.7.31

Nested tables in tabs Default theme

Example of table nesting in tabs implementation

HIDE CODE
<?php  
	$xcrud = Xcrud::get_instance();
    $xcrud->table('orders');
    $xcrud->default_tab('Order info');
    
    $xcrud->title_columns("<span style='border: 1px solid #e5e5e5;
  padding: 5px;
  display: block;
  margin-bottom: 6px;'><b> Order Number: {orderNumber}</b><br><b> Customer Number: {customerNumber}</b></span>");

    $orderdetails = $xcrud->nested_table('Order details','orderNumber','orderdetails','orderNumber'); // 2nd level
    $orderdetails->columns('productCode,quantityOrdered,priceEach');
    $orderdetails->fields('productCode,quantityOrdered,priceEach');
    $orderdetails->default_tab('Detail information');
    $orderdetails->order_by("productCode","asc");
    //$orderdetails->limit(1000);
    
    $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');
    
    $productLines = $products->nested_table('Product Lines','productLine','productlines','productLine'); // 4th level
    
    echo $xcrud->render();
	
?>

<script>
  $('.xcrud-tabs .menu .item').tab('change tab','tab1.php');
</script>
xCRUDConnection error: SQLSTATE[08004] [1040] Too many connections