Here's a great way to add email attachments to your Chronoforms in Joomla v1.5. Place this code in your, "On Submit code - BEFORE sending email:" under the FORM CODE tab:
The array is the absolute path to the file.
In Joomla 1.5, the default location is most commonly, "images/stories/Your_Folder_Name/Your_File_Name.jpg" for example.
You could also use the absolute path for your Joomla 1.5 which can be found in the admin Global Configurations under System. You can view the absolute path used for your logs file.
The code for that would be:
Finally, make sure "Enable Attachments" is set to "YES" in your Email Properties under the "Setup Email" tab.
You can now attach documents or images to your user's email address (Dynamic To) using ChronoForms! Sweet!
<?php
$MyForm =& CFChronoForm::getInstance('Your_Form_Name');//Replace with Your Form name
$form_id = $MyForm->formrow->id;
$MyUploads =& CFUploads::getInstance($form_id);
$MyUploads->attachments = array(JPATH_SITE.DS.'images'.DS.'stories'.DS.'Your_Folder_Name'.DS.'Your_File_Name');
?>
The array is the absolute path to the file.
In Joomla 1.5, the default location is most commonly, "images/stories/Your_Folder_Name/Your_File_Name.jpg" for example.
You could also use the absolute path for your Joomla 1.5 which can be found in the admin Global Configurations under System. You can view the absolute path used for your logs file.
The code for that would be:
<?php
$MyForm =& CFChronoForm::getInstance('Your_Form_Name');//Replace with Your Form name
$form_id = $MyForm->formrow->id;
$MyUploads =& CFUploads::getInstance($form_id);
$MyUploads->attachments [] = '/your_absolute_path/images/stories/your_folder/your_file';
?>
Finally, make sure "Enable Attachments" is set to "YES" in your Email Properties under the "Setup Email" tab.
You can now attach documents or images to your user's email address (Dynamic To) using ChronoForms! Sweet!