I think will be great implement this on the Hooks function for future release of Appgini.
so far I have this:
ts_project.php hook file
Code: Select all
function ts_projects_dv_readonly($selectedID) {
$readonly = (sqlValue("select lock_r from ts_projects where id={$selectedID}") === 1 ? true : false);
return $readonly;
}
inside of the function ts_projects_form between the
Code: Select all
$combo_employees->Render();
ob_start();
Code: Select all
$combo_employees->Render();
if (function_exists('ts_projects_dv_readonly')) {
if (ts_projects_dv_readonly($selected_id)) {
$AllowUpdate = 0;
$AllowInsert = 0;
}
}
ob_start();
Best regards;