Get page object for modular page from PHP

I’m impressed by your knowledge of Grav and your dedication to help, pamtbaau. Thank you very much. Using the $form->getPage() approach is exactly what I tried today, but having the line in there would lead to an error, as outlined in my reply above. I take it you tried your code, however, and it worked for you?