Form Buttons 1.7.25 Minimal theme
Create buttons to be displayed on the form
HIDE CODE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | <?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(); ?> |