Hi Bob,
I'm creating a form where users are going to be able to attach a PDf or JPG file to a form. The file will email as an attachment to the form recipient. I need to confirm a couple of things to make sure I do this right:
1. In Events I first add an "Upload File" event, then I add a "Custom Code" event where I drop the code below from FAQs.
2. Here's the code from FAQs. The attachment field name is called "sale_certificate". I assume I replace all of "$my_file_name" with "$sale_certificate" right? And if so, what do I use for "$my_file_path"?
Hope the above makes sense and that I'm doing this right!🙂
Regards,
Jose
I'm creating a form where users are going to be able to attach a PDf or JPG file to a form. The file will email as an attachment to the form recipient. I need to confirm a couple of things to make sure I do this right:
1. In Events I first add an "Upload File" event, then I add a "Custom Code" event where I drop the code below from FAQs.
2. Here's the code from FAQs. The attachment field name is called "sale_certificate". I assume I replace all of "$my_file_name" with "$sale_certificate" right? And if so, what do I use for "$my_file_path"?
<?php
$form->files['my_file'] = array(
'name' => $my_file_name
'original_name' => '',
'path' => $my_file_path.$my_file_name,
'size' => '',
'link' => str_replace(JPATH_SITE.DS, JURI::root(), $my_file_path.$my_file_name)
);
?>
Hope the above makes sense and that I'm doing this right!🙂
Regards,
Jose