Multi page form won't upload files

marce 12 Feb, 2018
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 12 Feb, 2018
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
marce 13 Feb, 2018
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
marce 14 Feb, 2018
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 14 Feb, 2018
1 Likes
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
marce 14 Feb, 2018
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 14 Feb, 2018
1 Likes
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
marce 15 Feb, 2018
Hi Bob,
​
Thank you!
​
Marcelo
Max_admin 15 Feb, 2018
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, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
marce 16 Feb, 2018
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 16 Feb, 2018
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
marce 19 Feb, 2018
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 19 Feb, 2018
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
marce 19 Feb, 2018
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
Max_admin 20 Feb, 2018
1 Likes
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, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
marce 21 Feb, 2018
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
Max_admin 21 Feb, 2018
Answer
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, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
marce 22 Feb, 2018
Hi Max,
​
Thank you againπŸ™‚
​
Marcelo
This topic is locked and no more replies can be posted.