I have 2 questions:
1. What I need is when someone fills out my form, in the response email the visitor receives, a file is also attached.
Ok, so I have searched your forums and have found what I am looking for. The problem is I don't know where to put the snippet of code!
This is the code that I have found, I don't know which file to place it in (chronoform.php?) and where exactly. I don't know where "Add this code to the OnSubmit Before box" is:
Is this how it is supposed to be?
2. I need to have two contact forms with two different files to attach and email. For example, when a visitor files out Form A, they receive File A in the email response. If they fill out Form B, they receive File B.
Is this possible?
Please help! I'm running out of time LOL...
THANK YOU!!!
1. What I need is when someone fills out my form, in the response email the visitor receives, a file is also attached.
Ok, so I have searched your forums and have found what I am looking for. The problem is I don't know where to put the snippet of code!
This is the code that I have found, I don't know which file to place it in (chronoform.php?) and where exactly. I don't know where "Add this code to the OnSubmit Before box" is:
<?php
if ( !$mainframe->isSite() ) return;
$form_id = $MyForm->formrow->id;
$MyUploads =& CFUploads::getInstance($form_id);
$MyUploads->attachments[] = 'images/newsletter.pdf';
?>
Is this how it is supposed to be?
/* Do Onsubmit before_email plugins*/
if(!$MyForm->haltFunction["plugins_before_email"]){
$MyPlugins->runPlugin('before_email');
$MyForm->addDebugMsg('Form passed the plugins step (if enabled) OK');
//show errors if any
if($MyForm->showFormErrors($MyForm->formrow->name)){
$MyForm->showForm($MyForm->formrow->name, $posted);
return;
}
if ( !$mainframe->isSite() ) return;
$form_id = $MyForm->formrow->id;
$MyUploads =& CFUploads::getInstance($form_id);
$MyUploads->attachments[] = 'images/newsletter.pdf';
}
2. I need to have two contact forms with two different files to attach and email. For example, when a visitor files out Form A, they receive File A in the email response. If they fill out Form B, they receive File B.
Is this possible?
Please help! I'm running out of time LOL...
THANK YOU!!!