Most Common Settings
Inline Edit
Limitations:
// CHANGE ON EVERY FILE
$pdocrud->tableHeading("");
$pdocrud->dbOrderBy("id desc");//descending
// OR
$pdocrud->dbOrderBy(array("id desc","order_no desc"));
// DEFAULT = 25
$pdocrud->recordsPerPage(12);
// DEFAULT = FALSE
$pdocrud->setSettings("inlineEditbtn", true);
$pdocrud->setSettings("tableCellEdit", true);
// DEFAULT = TRUE
$pdocrud->setSettings("actionbtn", false);
Other Possible changes Settings
// Change table subheading
$pdocrud->tableSubHeading("here you can add secondary information about the table");
// Set Current Page
pdocrud->currentPage(2);
// 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();
Other / Misc Settings
// CAN CHOOSE FROM - default, dark, fair, green, advanced
$pdocrud->setSkin("green");
$pdocrud = new PDOCrud(false, "pure", "pure");
$settings["includeTemplateCSS"] = false;
$settings["includeTemplateJS"] = false;
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();