Form Buttons 1.7.25 Bootstrap 4.5 theme
Create buttons to be displayed on the form
HIDE CODE
<?php // Get an instance of the Xcrud class $xcrud = Xcrud::get_instance(); // Set the table to work with $xcrud->table("orders"); // Define which columns to display in the table $xcrud->columns("orderDate,status,requiredDate,shippedDate,comments"); // Define which fields are available for data entry or editing $xcrud->fields("orderDate,status,requiredDate,shippedDate,action"); $xcrud->fields_arrange("orderDate,status,requiredDate,shippedDate","Info",true); $xcrud->fields_arrange("action","Action",true); // Change the input type of the 'status' field to a select dropdown and provide options $xcrud->change_type("status","select","",array("Not Shipped"=>"Not Shipped","Shipped"=>"Shipped","Completed"=>"Completed")); $xcrud->label("action",""); $xcrud->change_type("action","button","",array("href"=>"#","after"=>"edit","task"=>"save","icon"=>"fa fa-file","title"=>"Save My Form")); $xcrud->set_attr("action",array("class"=>"btn btn-light xcrud-action","data-confirm"=>"Do you wish to save?")); $xcrud->hide_button("save_edit"); $xcrud->hide_button("save_return"); $xcrud->hide_button("save_new"); // Render the xcrud instance to display the table and form echo $xcrud->render(); ?>
Orders
# | Orderdate | Status | Requireddate | Shippeddate | Comments | |
---|---|---|---|---|---|---|
1 | 27.06.2003 00:00:00 | Shipped | 04.07.2003 00:00:00 | 03.07.2003 00:00:00 | NULL | View Edit Remove |
2 | 01.07.2003 00:00:00 | Shipped | 10.07.2003 00:00:00 | 05.07.2003 00:00:00 | View Edit Remove | |
3 | 02.07.2003 00:00:00 | Shipped | 12.07.2003 00:00:00 | 03.07.2003 00:00:00 | NULL | View Edit Remove |
4 | 04.07.2003 00:00:00 | Shipped | 14.07.2003 00:00:00 | 06.07.2003 00:00:00 | Customer is interested in buying more Ferrari | View Edit Remove |
5 | 10.07.2003 00:00:00 | Shipped | 20.07.2003 00:00:00 | 15.05.2024 00:00:00 | PROVA | View Edit Remove |
6 | 07.07.2003 00:00:00 | Shipped | 16.07.2003 00:00:00 | 13.07.2003 00:00:00 | View Edit Remove | |
7 | 16.07.2003 00:00:00 | Shipped | 23.07.2003 00:00:00 | 21.07.2003 00:00:00 | View Edit Remove | |
8 | 24.07.2003 00:00:00 | Shipped | 02.08.2003 00:00:00 | 30.07.2003 00:00:00 | View Edit Remove | |
9 | 01.08.2003 00:00:00 | Shipped | 09.08.2003 00:00:00 | 04.08.2003 00:00:00 | View Edit Remove | |
10 | 08.08.2003 00:00:00 | Shipped | 16.08.2003 00:00:00 | 13.08.2003 00:00:00 | View Edit Remove |