Buy Now
Sign in

Multi page form won't upload files

marce , February 12 at 14:55
Answered
M
marce
Hi​
​​
​I am using Chronoforms 6 and I am experiencing difficulties with uploading files through my multi page form.
The debugger says: [info] => File is not present.
Is there something I am missing? I've been lookin through and through the form setup, but I can not figure it out
Best Regards
Marcelo​
GreyHead
Hi Marcelo,
If you can put the Upload Files element on the last page of the form that should work smoothly, Otherwise you need to have the Upload Files action on the action that the Files Upload element submits to and add the form info to the form data so that it is carried forward by the Multi Page action.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
M
marce
Hi Bob,
Thank you for the fast response.
I am not sure I understood the procedure on how this is done. I could choose the first alternative you mentioned, but that would break the logic of the form
I am a very slow learner, some I am going to try to break it up in steps so my brain can keep up with your explanation
  1. The upload field is in page 3 out of 4.
  2. I added a upload action in the submit event - this does apparently not work
  3. I added an upload action to page 3 event + a save to session action - this does not work
  4. You mention to add the form info to the form data. Did you by this mean to add add a save to session action to page 3 event? I also added a save data action to the page 3 event.
  5. I also have a save data action in the submit event
... all of this probably sounds like I am fumbling in the dark to you ... and yes I am ... it is pretty dark out here
Marcelo ​
M
marce
Hi
I tried some simple testing to see if it worked at all by setting the upload field in the last page of the form. I can confirm that this worked!
The next step was to try moving the upload field to page 2.
I added an upload file action to event page 2 or so I understood I should do.
Furthermore I should add the form info to the form data, this part I dont understand. I added a save to session action to event page2, but it cant be this as it doesnt work. I also tried a save to data action for the page2 event.
Can somebody please explain exactly what is I should do? Cause I am obviously a little bit stupid
Marcelo
GreyHead
Hi Marcelo,
You need the Upload File action in the event that Page 2 submits to - this is most likely the Page 3 event.
Similarly the Save Data action would need to be in the Page 3 event after the Upload File action.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
M
marce
Hi Bob
Indeed that did the work! Thank you.
There is a little but ... I noticed that the uploaded file is not attached to the email.
So I added an email action to the page 3 event. Now the uploaded file is attached to the mail, but not the form info from page 3 . So I guess this is not the way to do it.
How do I tell the email action in the submit event to attach the uploaded file?
Marcelo
GreyHead
Hi Marcelo,
I'm not sure of the best way to add file attachments in a Multi Page form using CFV6. Please ask Max to take a look - you can send him a message using the Contact Us menu above and linking to this thread.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
M
marce
Hi Bob,
Thank you!
Marcelo
admin
Hi Marcelo,
After the "Upload" action is processed, the file path is available under: {var:upload_action_name.path}, you can then use that in the email action "Attachments" box, but only if the email action is in the next event, if not then the path needs to be stored some where, like in a session var using a "save to session" action.
Best regards
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
M
marce
Hi Max,
The email is unfortunately not in the next event
I tried several things now, but nothing worked yet.
I added {var:upload_action_name-path} in attachments list of the email action
I added a save to session action in the same event as the upload action.
I also tried adding the save to session action in the upload action and within the "Success field".
I also tried adding the session action to the same event as where the upload field is.
Where did I go wrong?
Marcelo
GreyHead
Hi Marcelo,
You need the Save to Session action after the File Upload action and in the same event.

​You can recover this info using {session:NAME} where name is the name you used when saving it. You'll need to do that before the Email action in the last event.​
​​
​Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
M
marce
Hi Bob,
I added a Save to Session action after the File Upload action and in the same event.
So far so good.
The next part is where I do not follow ...
I added a Custom Code action with {session:save_to_session43} right before the email action - did not work, I also tried some other options without success.
In what action should I insert the {session:save_to_session43} ?
Regards Marcelo
GreyHead
Hi Marcelo,
I suggest that you try putting the {session:save_to_session43} in the Attachments box of the Email action - I really don't know how Max has this working.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
M
marce
Hi Bob,
Thank you for trying to help me!
I already tried that
Here is a recap of my settings:
I have a multi page form consisting of 4 pages.
On page 3 I have an upload file field.
In the page 4 event I have the upload files action followed by the save to session action right after in the same event.
The submit event has the email action and in the attachments box I added {session:save_to_session43}
Marcelo
admin
Hi,
What is the data provider of the "Save to session" action ? it should be set to:
{var:upload_files_name.file_field_name.path}
Then you can use {session:name_of_session_action} in the email attachments box
Best regards
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
M
marce
Hi Bob and Max,
Thank you a lot for helping me out! I got it working now
Here comes an explanation for lost souls like me, and how I got it working with the help of Bob and Max. I am noob and things did not always seem so obvious:
  1. I have a multi page form consisting of 4 pages.
  2. On page 3 I have an "upload file" field (in my case the default name was "file38").
  3. In the page 4 event I have the upload files action ( the default name was "upload25")
  4. followed by the "save to session" action (default name " save_to_session43") in the same event.
  5. In the "Data provider" field of the "save to session action" I entered, {var:upload_files_name.file_field_name.path}. In my case {var:upload25 .file38.path}
  6. In the submit event I added {session:save_to_session43} in the "Attachments box" of the "Email" action.
Regards
Marcelo
admin
Hi Marcelo,
This line:
{var:upload25.file38./httpdocs/components/com_chronoforms6/chronoforms/uploads/}
should be changed to:
{var:upload25.file38.path}
The way to get the shortcode syntax in general can be explained when you check the debug info, you can find the exact path to use to extract the value you need.
Best regards
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
M
marce
Hi Max,
Thank you again
Marcelo