Settings
$pdocrud->setSettings("inlineEditbtn", true);
$pdocrud->setSettings("tableCellEdit", true);
$pdocrud->setSettings("actionbtn", false);
$pdocrud->setSettings("checkboxCol", false);
$pdocrud->setSettings("viewFormTabs", true);//set view form tabs enabled
$pdocrud->setSettings("pagination", false);
$pdocrud->setSettings("searchbox", false);
$pdocrud->setSettings("deleteMultipleBtn", 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("numberCol", false);
$pdocrud->setSettings("printBtn", false);
$pdocrud->setSettings("pdfBtn", false);
$pdocrud->setSettings("csvBtn", false);
$pdocrud->setSettings("excelBtn", false);
$pdocrud->setSettings("hideLable",true);
$pdocrud->setSettings("actionBtnPosition", "left");
$pdocrud->setSettings("enumToSelect", true);
$crud->setSettings("setToSelect", true);
$crud->setSettings("clonebtn", true);
$pdocrud->setSettings("viewEditButton", true);
$pdocrud->setSettings("viewBackButton", false);
$pdocrud->setSettings("viewPrintButton", true); // whether to show "print" button or not in view page (TRUE)
$pdocrud->setSettings("viewDelButton", false); // whether to show "delete" button or not in view page (TRUE)
$pdocrud->setSettings("closeButton", false); // whether to show "close" button or not in view page (FALSE)
$pdocrud->setSettings("closeButton", true);
$pdocrud->setSettings("placeholder", true);
$pdocrud->buttonHide("submitBtn"); // available parameters are "submitBtnSaveBack","submitBtnBack","submitBtnSaveBack","cancel"
Add Callback Functions
$pdocrud->addCallback("before_select", "beforeloginCallback");
$pdocrud->addCallback("after_insert", "afterInsertCallBack");
$pdocrud->addCallback("after_update", "afterUpdateCallBack");
$pdocrud->addCallback("before_table_data", "beforeTableDataCallBack");
$pdocrud->addCallback("format_table_data", "formatTableDataCallBack");
$pdocrud->addCallback("format_table_col", "formatTableColCallBack");
$pdocrud->addCallback("after_table_data", "afterTableDataCallBack");
$pdocrud->addCallback("format_sql_data", "formatSQLDataCallBack");
$pdocrud->addCallback("before_sql_data", "beforeSQLDataCallBack");
$pdocrud->addCallback("before_switch_update", "beforeSwitchUpdateCallBack");
$pdocrud->addCallback("before_insert_form", "beforeInsertForm");
$pdocrud->addCallback("after_insert_form", "afterInsertForm");
$pdocrud->addCallback("before_edit_form", "beforeEditForm");
$pdocrud->addCallback("after_edit_form", "afterEditForm");
$pdocrud->addCallback("before_view_form", "beforeViewForm");
$pdocrud->addCallback("after_view_form", "afterViewForm");
$pdocrud->addCallback("before_select_form", "beforeSelectForm");
$pdocrud->addCallback("after_select_form", "afterSelectForm");
$pdocrud->addCallback("before_email_form", "beforeEmailForm");
$pdocrud->addCallback("after_email_form", "afterEmailForm");
$pdocrud->addCallback("before_select", "beforeSelect");
$pdocrud->addCallback("after_select", "afterSelect");
$pdocrud->addCallback("before_insert", "beforeInsert");
crud->addCallback("after_insert", "afterInsert");
crud->addCallback("before_update", "beforeUpdate");
crud->addCallback("after_update", "afterUpdate");
crud->addCallback("before_delete", "beforeDelete");
crud->addCallback("after_delete", "afterDelete");
crud->addCallback("before_switch_update", "beforeSwitchUpdate");
crud->addCallback("after_switch_update", "afterSwitchUpdate");
//
//This 'beforeloginCallback' function must be added on script/pdocrud.php file
function beforeloginCallback($data, $this) {
$data["data"]["user_pass"]= md5($data["data"]["user_pass"]);
return $data;
}
Java Triggers
jQuery(document).trigger("pdocrud_on_load", [this]); // CUSTOM SCRIPT AFTER LOADING SCRIPT
jQuery(document).trigger("pdocrud_before_ajax_action", [obj, data]); // CUSTOM SCRIPT BEFORE AJAX ACTION
jQuery(document).trigger("pdocrud_after_ajax_action", [obj, response]); // CUSTOM SCRIPT AFTER AJAX ACTION
jQuery(document).trigger("pdocrud_after_submission", [obj, responseText]); // CUSTOM JAVASCRIPT AFTER FORM SUBMISSION
//
////EXAMPLE
jQuery(document).ready(function () {
jQuery(document).on("pdocrud_before_ajax_action",function(event,obj,data){
console.log(obj);
console.log(data);
});
});
Configuration
function dbTable($tableName)