I noticed more people have the exact same problem. But there have never been a reply on this kind of topic. Could anyone explain why it is not possible to use a snippit or chunk call in the &report mail?
Hope that someone has the answer!
Rogier
Have you tried the eformOnBeforeMailSent event.
-
☆ A M B ☆
- 24,524 Posts
eForm manages its own placeholders; it does not use the MODx placeholder array or merging. So it gets the specified chunk, merges its own placeholders, and then uses the chunk as the message of the mail. Since the chunk is never otherwise parsed, any other MODx tags will not be processes.
If you want dynamic content in the email other than the eForm placeholders based on the form fields, you need to add these in a snippet with a function to evoke the eformOnBeforeMailSent event (also processed directly within the eForm snippet). Basically what you do here is add your own custom data to the $fields array that eForm uses to generate the mail message from the chunk. In this way you can add your own placeholders that are not from the form fields. Again, these placeholders are processed directly by eForm and have nothing to do with the MODx parser.
Or the direct page to the events example: eform_example_events.htm
Thanks guys, will go and have a look.
Hi, I tried to use the eFormOnBeforeMailSent but I don’t know how to use it propperly. I would like to see an example on how to create a ditto call. Is that possible?
Thanks!
Rogier