To put it simple: I have a grid based on a table of time entries. I want to show these entries based on employee ID. The employee can create a new entry but should not input his employee ID. This should happen automatically under the hood via a session variable. Is there way to get this done?
Regards, Rudolf
1 Answers
Hello,
Yes, that’s doable using custom events (on_update, on_insert etc). That’s a common scenario where these events are used.
https://www.gridphp.com/docs/grid-events/
For e.g.
$e["on_insert"] = array("add_client", null, true); $g->set_events($e); function add_client($data) { $data["params"]["userid"] = $_SESSION["userid"]; }
Your Answer