Original Source
https://pdocrud.com/demo/pages/inline-edit
https://pdocrud.com/demo/pages/table-cell-editing
https://pdocrud.com/demo/pages/table-operations
https://pdocrud.com/demo/pages/pagination
https://pdocrud.com/demo/pages/order-by (MAYBE VIEW)
https://pdocrud.com/demo/pages/set-settings
https://pdocrud.com/demo/pages/SET-Column-type
https://pdocrud.com/demo/pages/hide-options
https://pdocrud.com/demo/pages/hide-all-labels
https://pdocrud.com/demo/pages/loading-template-js-css
https://pdocrud.com/demo/pages/action-button-left-side
https://pdocrud.com/demo/pages/clone-rows
Settings
Inline Edit
PDOCrud support inline edit of records also. To show the inline edit action button, just set its settings to true. Please note that inline edit doesn't work with table join operation.
Edit Single Cell
If you want to edit a single cell value directly similar to spreadsheet editing, you can easily do by enabling "tableCellEdit". On click on table rows, it shows the value inside the input text box. You can edit the value inside the input type text. You need to press enter to save the value. You can click on any table cell to edit the value directly.
Limitations:
Edit Tables
Inline Edit
PDOCrud support inline edit of records also. To show the inline edit action button, just set its settings to true. Please note that inline edit doesn't work with table join operation.
Edit Single Cell
If you want to edit a single cell value directly similar to spreadsheet editing, you can easily do by enabling "tableCellEdit". On click on table rows, it shows the value inside the input text box. You can edit the value inside the input type text. You need to press enter to save the value. You can click on any table cell to edit the value directly.
Limitations:
$pdocrud = new PDOCrud();
//set inline edit true, it will show inline edit button
$pdocrud->setSettings("inlineEditbtn", true);
//Edit cell on click
$pdocrud->setSettings("tableCellEdit", true)
echo $pdocrud->dbTable("orders")->render();
Change Settings
$pdocrud = new PDOCrud();
// Change table heading
$pdocrud->tableHeading("Job Application Information");
// Change table subheading
$pdocrud->tableSubHeading("here you can add secondary information about the table");
// How Many records to display per page
$pdocrud->recordsPerPage(12);
// Set Current Page
pdocrud->currentPage(2);
// Sort table by asc / desc
$pdocrud->dbOrderBy("id desc");//descending
$pdocrud->dbOrderBy(array("id desc","order_no desc"));//pass in array
//hide action buttons (view/delete/edit) if not required
$pdocrud->setSettings("actionbtn", false);
// Hide form/table buttons
$pdocrud->setSettings("viewEditButton", true);
$pdocrud->setSettings("viewBackButton", false);
$pdocrud->setSettings("closeButton", true);
// Hide All Labels
$pdocrud->setSettings("hideLable",true);
//enable clone button, can be done in settings page also.
$pdocrud->setSettings("clonebtn", true);
// You can directly hide/show various options using the config.php or you can also do in code also
$pdocrud->setSettings("pagination", false);
$pdocrud->setSettings("searchbox", false);
$pdocrud->setSettings("deleteMultipleBtn", false);
$pdocrud->setSettings("recordsPerPageDropdown", false);
$pdocrud->setSettings("recordsPerPageDropdown", false);
$pdocrud->setSettings("totalRecordsInfo", false);
$pdocrud->setSettings("addbtn", false);
$pdocrud->setSettings("editbtn", false);
$pdocrud->setSettings("viewbtn", false);
$pdocrud->setSettings("delbtn", false);
$pdocrud->setSettings("checkboxCol", false);
$pdocrud->setSettings("numberCol", false);
$pdocrud->setSettings("printBtn", false);
$pdocrud->setSettings("pdfBtn", false);
$pdocrud->setSettings("csvBtn", false);
$pdocrud->setSettings("excelBtn", false);
//set position to left (Default is right)
$pdocrud->setSettings("actionBtnPosition", "left");;
$config["hideLable"] = true; // Set "hideLable" to "true" in config.php to hide all labels in all forms
$config["loadJsPlugins"] = array("chosen"); // Load plugins initially (list of plugins available) in config.php
$config["formtype"] = "singlestep"; // By default single step form in config.php
$config["displayErrors"] = true; // Display errors directly in config.php
$config["submissionType"] = "ajax"; // Submit whether using ajax or using simple post in config.php
$config["jsvalidation"] = "bootstrap_validator"; // Enable js validation in config.php
$config["phpvalidation"] = true; // Enable php validation in config.php
$config["loadJs"] = array("jquery.min.js","jquery-ui.min.js"); // Load js initially (this js needs to be present in script/js fodler)
$config["loadCss"] = array("style.css","jquery-ui.css"); // Load css initially (this css needs to be present in script/css fodler)
echo $pdocrud->dbTable("orders")->render();
Template css and js files
You can chose whether you want to load the template js and css files or not using the settings $config["includeTemplateCSS"] = true; and $config["includeTemplateJS"] = true;
It is useful when your theme is already loading the bootstrap css and js files so you don't want to load again.
Please note that loading other css and js files can also be set in config file e.g jquery.js etc files.
$settings["includeTemplateCSS"] = false;
$settings["includeTemplateJS"] = false;
$pdocrud = new PDOCrud(false, "","", $settings);
echo $pdocrud->dbTable("orders")->render();