Hi,
thank's a lot to all!
I've created the files with my custom Hook.
All works good but I think there are some issues with the FormIt mail attachments
because with and without my custom hook the attachment is not send.
Passing the POST array for test, the file value attached isn't send in the POST array.
I don't know if I miss something in my code because I can't find documentation about FormIt mail attachments.
This is how I've implemented that:
FORMIT
[[!FormIt?
&hooks=`spam,attachPdf,email,FormItAutoResponder,redirect`
&emailTpl=`EmailTemplate`
&emailTo=`[email protected]`
&redirectTo=`1`
&fiarTpl =`EmailTemplate`
&fiarSubject =`Sending confirmation email`
&fiarToField=`email`
&fiarFrom=`[email protected]`
&fiarFromName=`Name`
&fiarReplyTo=`email`
]]
FORM TAG
<form id="formPrivate" action="[[~[[*id]]]]" method="post" enctype="multipart/form-data">
<!-- field list -->
<!-- input FILE -->
<input id="attachment" name="attachment" type="file" value="[[+fi.attachment]]" />
<!-- field list and submit -->
</form>
EMAIL TEMPLATE (I tried to insert the value of field)
<strong>Name:</strong> [[+name]]
<!-- Field List -->
<!-- Field input File -->
[[+attachment]]
Thank's a lot another time,
your help is very precious,
regards,
Davide
[ed. note: dido_modx last edited this post 10 years, 1 month ago.]