Hi!
I posted this maybe in the wrong place so I move it here instead:
I have just installed the new Chronoforms withthe new feature Multi Upload.
The problem is that i can't get the file attached to the sent email.
I have attached a backup copy of my form here so you can see my settings.
Briefly I have set the Field name in the Preview like this: attachments[]
Then under Ebents I set it up like this:
Fields configuration: attachments[]:jpg-png-gif-pdf
Maximum limit: 5
Max size: 300
No more settings.
This is obviously not done by the book as it doesn't work so maybe someone brighter can enlighten my day....
Thanks.
Micke
I posted this maybe in the wrong place so I move it here instead:
I have just installed the new Chronoforms withthe new feature Multi Upload.
The problem is that i can't get the file attached to the sent email.
I have attached a backup copy of my form here so you can see my settings.
Briefly I have set the Field name in the Preview like this: attachments[]
Then under Ebents I set it up like this:
Fields configuration: attachments[]:jpg-png-gif-pdf
Maximum limit: 5
Max size: 300
No more settings.
This is obviously not done by the book as it doesn't work so maybe someone brighter can enlighten my day....
Thanks.
Micke
Hi,
I have came so far with this now that I have got everything working except to attach the files to the email sent by the form.
The attachment gets uploaded to the defined path on the web server but not attached to the email.
Can anyone please help me with this final step?
I have came so far with this now that I have got everything working except to attach the files to the email sent by the form.
The attachment gets uploaded to the defined path on the web server but not attached to the email.
Can anyone please help me with this final step?
Hi,
I had the same problem and think I found a fix. Posted it here:
http://www.chronoengine.com/forums.html?cont=posts&f=2&t=87500&p=304124&hilit=multi+upload#p304124
Give it a go. Hope it works for you.
I had the same problem and think I found a fix. Posted it here:
http://www.chronoengine.com/forums.html?cont=posts&f=2&t=87500&p=304124&hilit=multi+upload#p304124
Give it a go. Hope it works for you.
Hi LAMF,
I've worked out how add files from the Multi-upload widget to a zip file and attach that to an email. Please see this FAQ.
Bob
I've worked out how add files from the Multi-upload widget to a zip file and attach that to an email. Please see this FAQ.
Bob
Hi guys,
I gave this up and now when coming back I saw your two replies so I gave it a try again.
I went for Bobs suggestion without having to hack the code.
Still no success.
Here's my setup:
In the Wizard under Preview => Multi Upload => General tab:
Label text: Bilagor (attachments in english)
Field Name: bilaga[]
Lmimit: 5
In the Wizard under Events => On Submit => Upload Files => Settings tab:
Enabled: Yes
Fields Configuration: bilaga[]:jpg-png-gif-pdf-zip-rar
Upload Path: JOOMLA_PATH/images/files
Max size in KB: 500
Min Size in KB: 1
Under Advanced tab:
Array Fields: bilaga[]
I then added the custom code under the Events between the Upload Files and the first Email action.
I set it up like this:
Settings tab:
Mode: Controller
Action Label: Zippa bilagor (zip attachments)
Code: Your code from the tutorial
Then finally in the email action where the files should be attached I set it up like this:
Enabled: Yes
Action Label: upload_zip
Send as: html
Attachments fields name: bilaga[],upload_zip
But it still wont attach any files nor zip nor upload to server.
So where did I do wrong?
It would be awesome if this could work out.
Another little thing is the styling.
If I want to change the text link label saying: "Attach file" to Swedish, how do I do that?
Also would like to add the button class to it so it looks like a button.
Thanks!
Micke
I gave this up and now when coming back I saw your two replies so I gave it a try again.
I went for Bobs suggestion without having to hack the code.
Still no success.
Here's my setup:
In the Wizard under Preview => Multi Upload => General tab:
Label text: Bilagor (attachments in english)
Field Name: bilaga[]
Lmimit: 5
In the Wizard under Events => On Submit => Upload Files => Settings tab:
Enabled: Yes
Fields Configuration: bilaga[]:jpg-png-gif-pdf-zip-rar
Upload Path: JOOMLA_PATH/images/files
Max size in KB: 500
Min Size in KB: 1
Under Advanced tab:
Array Fields: bilaga[]
I then added the custom code under the Events between the Upload Files and the first Email action.
I set it up like this:
Settings tab:
Mode: Controller
Action Label: Zippa bilagor (zip attachments)
Code: Your code from the tutorial
Then finally in the email action where the files should be attached I set it up like this:
Enabled: Yes
Action Label: upload_zip
Send as: html
Attachments fields name: bilaga[],upload_zip
But it still wont attach any files nor zip nor upload to server.
So where did I do wrong?
It would be awesome if this could work out.
Another little thing is the styling.
If I want to change the text link label saying: "Attach file" to Swedish, how do I do that?
Also would like to add the button class to it so it looks like a button.
Thanks!
Micke
I have now managed to upload the zip file to the server and the specified file path.
The changes I made to make this possible was:
Take away the [] after the Field Name: bilaga in the Multi Upload under Preview.
In the Wizard under Events => On Submit => Upload Files => Settings tab:
Fields Configuration: bilaga:jpg-png-gif-pdf-zip-rar
Under Advanced tab I took away the:
Array Fields:
In the custom code I commented out the code for deleting the original file (unfortunately I had to do this):
Then in the email event:
Attachments fields name: bilaga,upload_zip
Now it uploads the files to the server but doesn't attach them in the email.
And unfortunately it seems not possible to get rid of the original file.
The changes I made to make this possible was:
Take away the [] after the Field Name: bilaga in the Multi Upload under Preview.
In the Wizard under Events => On Submit => Upload Files => Settings tab:
Fields Configuration: bilaga:jpg-png-gif-pdf-zip-rar
Under Advanced tab I took away the:
Array Fields:
In the custom code I commented out the code for deleting the original file (unfortunately I had to do this):
//JFile::delete($f['path']);
Then in the email event:
Attachments fields name: bilaga,upload_zip
Now it uploads the files to the server but doesn't attach them in the email.
And unfortunately it seems not possible to get rid of the original file.
Hi LAMF,
Our posts crossed, I wrote this before your last one.
Please try one quick fix before we dig deeper. Each place that you have 'bilaga[]' (except the first one, the Widget Field Name) please just put 'bilaga' I think that ChronoForms will handle the [] where needed for the others.
The Attach file isn't obviously translatable without hacking the code, the Multi-language plug-in doesn't change it. Please try this JavaScript which worked on my test:
Please see this FAQ for a way to zip files and attach them to an email if that helps.
Bob
Our posts crossed, I wrote this before your last one.
Please try one quick fix before we dig deeper. Each place that you have 'bilaga[]' (except the first one, the Widget Field Name) please just put 'bilaga' I think that ChronoForms will handle the [] where needed for the others.
The Attach file isn't obviously translatable without hacking the code, the Multi-language plug-in doesn't change it. Please try this JavaScript which worked on my test:
window.addEvent('domready', function() {
$$('a.multi-upload-add-attachment').each(function(el) {
el.innerHTML = 'Bifoga fil';
});
});
Please see this FAQ for a way to zip files and attach them to an email if that helps.
Bob
Hi Bob,
I was wrong it is attaching one file to the email and zips it as well. So there are two files attached, one original and one zipped. Bo matter if I attach more than one thereäs only one attached.
How can I solve that so I get multiple fiels added to one zipped?
Also the javascript, where should I paste that in`?
I was wrong it is attaching one file to the email and zips it as well. So there are two files attached, one original and one zipped. Bo matter if I attach more than one thereäs only one attached.
How can I solve that so I get multiple fiels added to one zipped?
Also the javascript, where should I paste that in`?
Hi LAMF,
I have the [] in there in my test form and Max's User note says to add them . . .
The JavaScript should go into a Load JS action in the On Load event.
Bob
I have the [] in there in my test form and Max's User note says to add them . . .
The JavaScript should go into a Load JS action in the On Load event.
Bob
Hi Bob,
When adding the [] (see picture) I get an error message and no sent message at all.

The javascript works!
Is it also possible to add the button class to the
It should maybe be possible with a template override in joomla if I only find the file with the divs.
When adding the [] (see picture) I get an error message and no sent message at all.

The javascript works!
Is it also possible to add the button class to the
<a class="multi-upload-add-attachment command">
hyperlink for the "Attach file" link, that you find under the <div class="multi-upload-add-attachment command lft-button">
?It should maybe be possible with a template override in joomla if I only find the file with the divs.
Hi LAMF,
What error message so you get?
Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.
You should be able to add the class like this
Bob
What error message so you get?
Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.
You should be able to add the class like this
window.addEvent('domready', function() {
$$('a.multi-upload-add-attachment').each(function(el) {
el.innerHTML = 'Bifoga fil';
el.addClass('lft-button');
});
});
Bob
Thanks Bob the class was added smoothly!
the debug message is like this:
In this code it says only one file was uploaded while i tried to attach 4 different files. (limit is 5).
the debug message is like this:
Data Array:
Array
(
[chronoform] => kontakt-m
[event] => submit
[Itemid] => 499
[option] => com_chronoforms
[lang] => kontakt
[view] => form
[namn] => Micke
[email] => micke@lmiab.se
[subject] => Tesar
[message] =>
jlh
[multi_upload_limit_bilaga] => 3
[recaptcha_challenge_field] => 03AHJ_VuuBIy_TNjd8DmP5OPGRNRlOH8J62rlrnijz-_a9FpkLh9NxXzKLDm7ehCAmNPYlGGQwJLDTTWBbuBHIFrTcG3zT2En7c83MTCC0ZrD3Zd6p3oSnpau6CqLhlqKk2tT2noNVG-iVYw1A4-ud2-NSPstkWU1lN-jeGkr4oA8HsC8t5rJeNKQ
[recaptcha_response_field] => ityuba Butter
[submit] => Skicka
[b72d4f0da97956e7a1a98abc5cfa4207] => 1
[bilaga] => 20130110140915_FiskekortWebb2012ar.pdf
[_PLUGINS_] => Array
(
[upload_files] => Array
(
[bilaga] => Array
(
[name] => 20130110140915_FiskekortWebb2012ar.pdf
[original_name] => FiskekortWebb2012ar.pdf
[path] => /storage/content/07/100607/fly-tiers.se/public_html/images/files/20130110140915_FiskekortWebb2012ar.pdf
[size] => 65807
[link] => http://www.fly-tiers.se/images/files/20130110140915_FiskekortWebb2012ar.pdf
)
)
)
)
In this code it says only one file was uploaded while i tried to attach 4 different files. (limit is 5).
Hi Bob,
Solved!
My fault. I had totally missed to use the Multi File upload action instead of the standard Upload file action under the events. 😶
But nevertheless it was a good lesson and you definitely don't need the hack of the email.php file.
You should not uncomment the:
//JFile::delete($f['path']); -line
If you uncomment this line it wont work. At least not for me but that's no big deal.
Solved!
My fault. I had totally missed to use the Multi File upload action instead of the standard Upload file action under the events. 😶
But nevertheless it was a good lesson and you definitely don't need the hack of the email.php file.
You should not uncomment the:
//JFile::delete($f['path']); -line
If you uncomment this line it wont work. At least not for me but that's no big deal.
I reopen this as it sin't completely solved.
The thing tha tremain to be solved is that it is not possible to uncomment the line of code in the script that erases the original files on the server.
If I uncomment it the form doesn't work.
It would be great if it was possible to erase the original files somehow.
regards,
LAMF
The thing tha tremain to be solved is that it is not possible to uncomment the line of code in the script that erases the original files on the server.
If I uncomment it the form doesn't work.
It would be great if it was possible to erase the original files somehow.
regards,
LAMF
This topic is locked and no more replies can be posted.