Hello everyone!
I’m using a tiny form to upload a file with formIt:
[[!FormIt?
&hooks=`redirect`
&store=`1`
&redirectTo=`6`
&validate=`fileHere:required`
&submitVar=`sendFileContact`
]]
HTML
<form action="[[~[[*id]]]]" method="POST" enctype="multipart/form-data">
<input type="hidden" name="nospam" value="" />
<input id="file-upload" type="file" name="fileHere">
<button type="submit" value="Submit" name="sendFileContact">UPLOAD IT</button>
</form>
In the page ID 6, once the file is loaded and the user is redirected I got a more complex form with it’s own FormIt call:
[[!FormIt?
&hooks=`email,redirect`
&emailTpl=`EmailChunk`
&emailTo=`info@info.com`
&redirectTo=`30`
&emailSubject=`Enquiry from [[+full-name]]`
&emailFromName=`[[+full-name]]`
&emailFrom=`noreply@noreply.com`
&submitVar=`sendFormContact`
]]
[[!FormItRetriever]]
HTML
<form..... (more fields)...
<input type="hidden" name="upload-inventory-list" value="[[+fi.fileHere]]" />
<button type="submit" value="Submit" name="sendFormContact">SEND</button>
</form>
Because the &store = 1 property in the first form and using the [[!FormItRetriever]] in the second form I can see the file with the placeholder: value="[[+fi.fileHere]]"
But I’m not sure how to send the file as an attached file included in this new form.
Any guide please?
Thank you very much!