I fear I may be out of my depth but the gist of the idea is:
A potential customer submits a form, the form is then saved with FormIt, the client then receives an email with a link like www.website.com/pdf-resource?h={hash} and when the page opens it is a PDF with all the values from the FormIt submission loaded in the right fields.
I saw PDFResource by Jako, but that seems to be about creating physical PDFs and saving them somewhere.
The getService function is deprecated (in MODX 3). If you really need a service, then better use the new Dependency Injection Container.
In this case, the problem seems to be that you can’t create a class with the name “Generator”, as a class with the same name is already used by PHP → error message = The "Generator" class is reserved for internal use and cannot be manually instantiated.
Cached tags [[...]] are parsed before uncached tags [[!...]].
As the values of the [[+fi. ...]] placeholder tags are set by an uncached snippet call ([[!FormIt? ... ]]), the parser tries to parse the placeholder tags before they are set (if they are cached).
In this case it doesn’t really matter, because the MODX parser is somewhat tolerant and tries again (after the uncached snippet ran).
But it can create a problem if you (for example) use an output modifer.
Try [[+fi.partner_type:lowercase]] and [[!+fi.partner_type:lowercase]] and check the result.
So it’s best to use uncached placeholder tags, if they are set by an uncached snippet call.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.