Forums

Single and Mutliple upload fields in same form

genegun 27 May, 2013
Hi, I have a mutli page form setup with a multiple upload field (incl. zipping and javascript to display first field) on page 3. Everything is working well. Now I would like to add two single upload fields on page 1.

1. I added the two upload elements but they did not seem to be taken in by the multiple upload event.
2. I then added an Upload File event on the Page 2 with appropriate field name and extensions.

Files are successfully uploaded to the sever but:

- they do not get zipped with the others
- they are not included on their own along with the email. Even though I did put " upload_1,upload_2,upload_zip " in the field "Attachments fields name" of the email event, only the zipped files get emailed.

Thanks
genegun 28 May, 2013
Ok, I did a bit of testing and the way I figure it works:

- Single & multiple upload events must but on the next page from the one where the upload field(s) are
- The Zip cutstom code mut be on the same section as the upload events
- The Email event must also be placed just after the zip function

What I would need is, regardless of zipping (this is the less important function for me), I would like to have uploads from several single and mutliple upload fields located on different pages to all be emailed in the one final email that is triggered upon submission.

Thanks
GreyHead 28 May, 2013
Hi genegun,

I haven't worked through that myself but it ought to be possible. You'd need to make sure that the details of the uploaded files are passed forwards from one page to the next. The MultiPage or Session/Data actions will pass through the data in the $form->data array but this may not include all of the file data that you need. It should be possible to add a Custom Code action after the Upload Files action that will either (a) add the file info to the $form->data array or (b) save the file data in the User session to be recovered later.

Bob
genegun 29 May, 2013
Thanks for the reply Bob. Yes I had the feeling that it would be something like that. I was hoping that their would be a built-in function that carries the attachment data down the pages. Unfortunately, I have no knowledge of coding to do so myself so I might have to ask for paid support on that one.
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger