In my form you can upload a file. The file is uploaded correctly and added as attachment in the confirmation email, as long as the "Email verification" plugin is deactivated.
When I activate the "Email Verification" plugin (all other plugins are deactivated), the email verification works fine, but the (last) confirmation Email does not contain the attachment any more.
Debug messages (Chronoforms 3.2, the file upload field is "studiennachweis"):
Initial Submit:
Form passed first SPAM check OK
Form passed the submissions limit (if enabled) OK
Form passed the Image verification (if enabled) OK
Form passed the server side validation (if enabled) OK
$_POST Array: Array ( [name] => Test Bernd [strasse] => test [ort] => 85557 Test [email] => [email]bernd.schneidewind@googlemail.com[/email] [nureinmal] => ja [student] => ja [chrono_verification] => S957Q [358b1234d7dd877f54729ffbe3b61d3b] => 1 [1cf1] => 6727656ea4a14289e405aa5e1533ce41 [chronoformname] => Studenten )
$_FILES Array: Array ( [studiennachweis] => Array ( [name] => NAS_Komponenten.pdf [type] => application/pdf [tmp_name] => /tmp/phpXBZrZs [error] => 0 [size] => 43355 ) )
Upload routine started for file upload by : studiennachweis
/var/www-entw/components/com_chronocontact/uploads/Studenten/20120722143555_NAS_Komponenten.pdf has been uploaded OK
Form passed the plugins step (if enabled) OK
After confirmation of the verification link in the email:
E-mail message
From: SIS Verlag GmbH [info@sis-verlag.de]
To: [email]bernd.schneidewind@googlemail.com[/email]
Subject: Test-DVD SIS Datenbank
Vielen Dank für Ihr Interesse an unserer Gratis-DVD für Studenten.
Sie haben sich bei uns mit folgenden Daten registriert:
Name: Test Bernd
Straße/Hausnummer: test
PLZ/Ort: 85557 Test
E-Mail-Adresse: [email]bernd.schneidewind@googlemail.com[/email]
Studiennachweis: 20120722143555_NAS_Komponenten.pdf
Files:
(nothing more after this, and no attachment in this email)
Hi bschneid,
I suspect that the problem is that because the Email verification comes at a later time the attachments array is no longer available. The simplest answer is to put a download link into the email template - you have the file name available and would need to add the rest of the URL.
Alternatively you'd need to use a Custom Code action to add the form path to $form->files['attachment_name']['path'] so that the Email action can find and attach the file.
Bob
Hi bschneid,
I'm sorry, I missed that you were using CFv3 :-( The code I gave you is only good for v4.
I'm not sure that I know how to fix this in CFv3 - the Email Verification code was always a problem; if I remember correctly it takes over the email sending from the main ChronoForms code and doesn't do it very well. I'd probably add the code to send the email in one of the On Submit boxes, or the Extra Code box if you want it sent after the Verification is confirmed. Either way it's messy :-(
For any question about subscriptions or validation of any of the ChronoEngine products please contact Max directly by using the Contact Us form from the link above. I don't know how Max has the product validation set up.
Bob
Hi Bernd,
The problem should be fine in V4, you can add a db field in your table to store the files data which can be retrieved later by the "Email verification check" action.
You can install V4 side by side with V3 and test it before getting rid of V3
Please contact me though the "Contact us" page for any questions about the subscription.
Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Ok, thanks a lot!
I will install V4 and try this new form with V4 (without migrating the other forms) and will post the results then here...
Regards
Bernd