Aug 28th, 2011, 11:19 AM
Hi,
I didn't have any file input field, because I didn't need to make end users upload files.
I generate a pdf report server side at end of submission (print out of submission including submission id in filename) and I want to send it per mail in attachement.
I store the file path of generated pdf in a field (different for each submission) and I need to have something working using
{attachment file="{ANSWER_my_field_containing_file_path}"}
I've tried to use a hidden file input and set the value in the form, but the field is not updated at all, because it need a upload action.
Did you have already have such requirement ! (no file upload from users, attaching a file with filname changing between submission) ?
Thanks a lot for the support !
jpenon
I didn't have any file input field, because I didn't need to make end users upload files.
I generate a pdf report server side at end of submission (print out of submission including submission id in filename) and I want to send it per mail in attachement.
I store the file path of generated pdf in a field (different for each submission) and I need to have something working using
{attachment file="{ANSWER_my_field_containing_file_path}"}
I've tried to use a hidden file input and set the value in the form, but the field is not updated at all, because it need a upload action.
Did you have already have such requirement ! (no file upload from users, attaching a file with filname changing between submission) ?
Thanks a lot for the support !
jpenon
(Aug 28th, 2011, 11:03 AM)Ben Wrote: Hey guys,
I just tried it and it seems to work okay for me, as per the instructions here:
http://modules.formtools.org/swift_maile...ttachments
From what was posted, I think the value you're entering in the placeholder may be a little off - try just entering the file's field name as the field attribute value. e.g. if your form field looks like this:
Code:<input type="file" name="file123" />
In your email template, enter:
Code:{$attachment field="file123"}
Also, maybe double check that the file type you're uploading is on the white list of acceptable formats (for that, go to Settings -> Files).
Let me know if you still have trouble!
- Ben