Hello,
I try to redirect to another page after insert. I get the tips from other post:
$opt[“onAfterSave”] = “(function(){window.open(‘another_grid_page_here.php?id=$insert_id’,’_parent’);})();”;
$insert_id = $data[“Num_ticket”]; // it will hold newly inserted id
redirect works but I can’t pass the inserted id…
Any help appreciated.
Thanks
2 Answers
An approach could be to use on_after_insert event and you will get all posted data and inserted id there.
Docs: https://www.gridphp.com/docs/grid-events/
Code: https://gist.github.com/gridphp/4154071f305463a6f971b89d81fb0712
Your Answer