I have used PHPMaker for a long time as a complement to my developments in web pages. Without a doubt, PHPMaker is a great tool for creating forms, graphics and more.
But generally at least for my needs, I always required to use the benefits of PhpMaker and use it freely in my own web template.
PHPMaker 2019 was a great leap for it and finally there was the integration tool that I had always needed, however this was removed in later versions, so the 2021 version no longer allowed me to use my own templates Because my specific need is to access the data and some functions of PHPMaker because I have to find a solution and it is the one that I want to share with the community, as it could be useful to others.
Understand that my specific need is PHPMaker for forms and then that DATA read it in a separate folder example
Admin / PhpMaker
miwebPublica / My web Files
In order to achieve this it has been enough for me to include the following lines of code in the files of my website
namespace PHPMaker2021\PHPMAKER_PROJECT_NAME;
$RELATIVE_PATH = "ROUTE_TO_FOLDER_PHPMAKER-FILES/";
require_once $RELATIVE_PATH."vendor/autoload.php";
require_once $RELATIVE_PATH."src/constants.php";
require_once $RELATIVE_PATH."src/config.php";
require_once $RELATIVE_PATH."src/phpfn.php";
require_once $RELATIVE_PATH."src/userfn.php";
Adding these lines of code allows me to access the database and the PHPMAKER functions
I hope to be helpful