Hello All,
I have used 1 chronoform in number of pages(approx. 20), and i have set couple of email address in option Email To under Setup Email tab. all this working great. Thanks to chronoform.
Now i want to different email address only for 1 page.
Can anyone please tell me how can i able to set different email address for specific page ?
it's urgent. Any help will be appreciated.
Thanks in advance...!
I have used 1 chronoform in number of pages(approx. 20), and i have set couple of email address in option Email To under Setup Email tab. all this working great. Thanks to chronoform.
Now i want to different email address only for 1 page.
Can anyone please tell me how can i able to set different email address for specific page ?
it's urgent. Any help will be appreciated.
Thanks in advance...!
Hi,
The easiest way to do this is to use "Dynamic to" instead, and inject your address into the $form->data array, e.g: use "demail" in the dynamic to and use a cutsom code action before the email:
You will need to identify the page some how and alter the address above using an "if" statement.
Regards,
Max
The easiest way to do this is to use "Dynamic to" instead, and inject your address into the $form->data array, e.g: use "demail" in the dynamic to and use a cutsom code action before the email:
<?php
$form->data['demail'] = "me@m.com";
?>
You will need to identify the page some how and alter the address above using an "if" statement.
Regards,
Max
Hi Max,
Thanks for your quick guidance, i have solved it yesterday and forgot to mention here.
I have achieve it with below code :
Thanks once again!
Thanks for your quick guidance, i have solved it yesterday and forgot to mention here.
I have achieve it with below code :
$currentUrl = $_SERVER["REQUEST_URI"];
if($currentUrl =='http://www.google.com/') // comparing with page for which i am setting this email
{
$MyForm =& CFChronoForm::getInstance('formname');
$MyFormEmails =& CFEMails::getInstance($MyForm->formrow->id);
$MyFormEmails->setEmailData(1, 'to', 'emailname@domainname.com');
}
Thanks once again!
This topic is locked and no more replies can be posted.