Forums

How to edit form to send email with pdfs after submit

farb 17 Apr, 2012
I am using the latest version of Chronoforms for joomla 2.5 and I am wondering if there is a way to make a form that contains checkboxes send an email with the pdfs of the selected checkboxes to the user after they submit the form?
GreyHead 18 Apr, 2012
Hi farb ,

Just to be clear: You want to attach a static pdf to the email like a brochure corresponding to the checkboxes they have ticked? Not a pdf of the form data.

Bob
GreyHead 21 Apr, 2012
Hi farb,

I haven't tried this specific example but I'm pretty certain that if you use the Email [GH] action you can set a variable attachment name.

Assume for the moment that your files are in the /images/stories folder.

Use a Custom code action to determine which file is to be attached and set the value in $form->data['attach_file'] to JPATH_SITE.'/images/stories/'.$file_name .

In the Email [GH] action set the attachments box to {attach_file} and it should send your selected file.

NB Not tested and may need debugging. Add a Debugger action to the On Submit event so that you can check the paths are correct.

Bob
This topic is locked and no more replies can be posted.