Problem with multipage and file upload

enriture 16 Jan, 2014
Hi everybody!
I'm developing a multipage forum with chronoforms v4, and I've some problems with file upload. First I created a simple multipage form with these fields:
Textbox
Submit
Pagebreak
File upload
Submit
and I managed to get, after the second submit button, an email with the uploaded file as an attachment.

Then I went on with my "full" form, but now after the last submit button I get the email without any attachment.
Since I think it might be something wrong in the actions's order, I put here a screenshot and I hope someone could give me an help!
Thank you in advance

Problem with multipage and file upload image 1
GreyHead 18 Jan, 2014
Hi enriture,

You appear to have two events with the name On Submit, I'm not sure that ChronoForms will know which one is which. This may be causing your problem.

But also the detailed information about file uploads isn't necessarily passed between pages. The file name should be but you'd need to be sure that the rest of it was available in the event where the email is to be sent.

Adding Debugger actions temporarily should show you what is missing.

Bob
enriture 18 Jan, 2014
Hi GreyHead, thank you for your reply.
I tried just now changing to name of the last action (now there's only one called "submit"), and also removing the upload files action between the two pages, but with no result: I still only get the email to the admin's address, but without any attachment (and the uploaded file isn't uploaded to the server too).
Here're the debug info (showing the empty array).
Any other idea?
Max_admin 18 Jan, 2014
Hi,

The upload files action should be present in the page after the one which has the "file" field, and once the page with the file field is submitted, the files should be uploaded to the server, if they are not then there is a problem with the uploads config and you should fix it first, I suggest that you test the uploads with a simple one page form first to make sure that it works!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
enriture 18 Jan, 2014

Hi,

The upload files action should be present in the page after the one which has the "file" field, and once the page with the file field is submitted, the files should be uploaded to the server, if they are not then there is a problem with the uploads config and you should fix it first, I suggest that you test the uploads with a simple one page form first to make sure that it works!

Regards,
Max


Hi Max,
thank you for your reply.
I'm sorry but I'm not sure what you mean. Now I've the "file upload" field on page1, and the "file upload" action on page2: is it correct?

Anyway, as I said in my first post I already tested the upload with a single-page and also with a simple multipage form with these fields:
Textbox
Submit
Pagebreak
File upload
Submit

and these actions
on load: multipage - show html
on submit: multipage
on page 2: multipage - show html
on submit 2: multipage - upload files - email

In this case everything is working: the file is uploaded on the sever and attached to the email; so I really can't figure it out why with the longer form the file are not uploaded neither attached to the mail.

Thank you
Max_admin 18 Jan, 2014
Hi enriture,

I'm confused by your events names, so let me write an example, if your events are page1, page2, page3, and you have the file field in page1, then the upload files action should be in event page2, the NEXT event (page) in the processing.

You should also add an event loop action to the "on fail" event of the upload files action so that you can see any upload errors.

Please check that and let me know!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
enriture 18 Jan, 2014

if your events are page1, page2, page3, and you have the file field in page1, then the upload files action should be in event page2, the NEXT event (page) in the processing.


Yes, I'm sorry if it was a bit confusing... actually this is exactly what I have now, but as I said the file upload is not working.
(moreover, even if it's not my first concern, I also added an event loop action to the "on fail" event, but I don't see any error message, even if I try to upload a file bigger than the maximum size.
Max_admin 28 Jan, 2014
Hi enriture,

Apologizes, I lost this message in the last few days, did you manage to solve the problem ?

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
enriture 28 Jan, 2014
No, I set everything as you said (upload field in page 1 and upload files action in event page2), but it still doesn't work...
Max_admin 28 Jan, 2014
Ok, please try this, drag a "custom code" action just after the "upload files" action and write this:

<?php
print_r2($form->files);


Can you see the files uploaded ?

If yes then please add a similar action with the same code to the next step, can you see the files list ?

You may also switch to V5 and use it just for this form, it should handle this issue fine, but you need to wait for the new release in the next day or two, or contact me through the contact us page to get the installer.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.