Quote from: Dimmy at Oct 20, 2009, 09:29 AM
Well when do the hooks activate?
In the order that they are put in.
like in eform I can say just before the mail is send out I can alter the output so I can add stuff to it maybe a time stamp or whatever I like or put the fields in the database etc etc. (http://wiki.modxcms.com/index.php/EForm#Events)
So just add a hook before as a custom snippet. Example, here with custom snippet named ’addMyEvents’:
[[!FormIt? &hooks=`addMyEvents,email,redirect`]]
Would call the addMyEvents hook first, then the email hook.
report is the chunk that is used to create the mail that is send out
using the names of the fields as placeholders, that way you can make a nice html email or at least order the values from the fields in a way you like.
That’s in there - &emailTpl.
eform also hase a chunk that can be used to send out to the one filling the form it will be differnd from the report chunk (the mail that is send to the owner of the site )
That could be another hook; you could add a hook that does just that. And then add some custom properties to pass in to that hook, etc.
did you use eForm before? look at what eform can do and make formit at least have the same options.
I disagree; eForm was bloated and did bad practices; I’m trying to make FormIt leaner and more flexible.