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
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
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
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
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
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
Hi Bob,
Thank you!
Marcelo
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...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
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
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
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
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
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
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...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
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...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Hi Max,
Thank you again🙂
Marcelo