Skip to content

Instantly share code, notes, and snippets.

@gridphp
Created August 27, 2023 08:01
Show Gist options
  • Save gridphp/4154071f305463a6f971b89d81fb0712 to your computer and use it in GitHub Desktop.
Save gridphp/4154071f305463a6f971b89d81fb0712 to your computer and use it in GitHub Desktop.
$e["on_after_insert"] = array("after_insert", null, true);
$g->set_events($e);
function after_insert($data)
{
    // where client_id is primary key (first column of grid)
    $id = $data["client_id"];
    phpgrid_msg("<script>location.href='$id';</script>")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment