Dynamic email not working

santosh.karkhanis 06 Jan, 2016
Trying dynamic email. But not working.
Static email is working fine.

My email field : email
I added in Dynamic To : email

Also added the code
<?php
if ( !empty($form->data['input_checkbox_1']) && ($form->data['input_checkbox_1'] == '1') ) {
$form->set("email_77", "enabled", 1); // this line will work only on CFv4
$form->actions_config[77]["enabled"] = 1; // this line will work only on CFv5
}
?>
in custom code box before the email box.

But still not working.

Can anyone help?
calculus00 06 Jan, 2016
Answer
Hello santosh.karkhanis,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How to send an Email dynamically
P.S: I'm just an automated service😉
GreyHead 06 Jan, 2016
Hi santosh.karkhanis,

The code needs to be changed to match the action ID in your form - and one of the two lines should be commented out depending on which version of ChronoForms you are using.

Actually the easiest way to do this in the current version of CFv5 is to use the Event Switcher action.

Bob
santosh.karkhanis 06 Jan, 2016
Thanks Bob.

1> I already with adding code before tha mail box.
2> I never used Event Switcher action. Can you help?
santosh.karkhanis 06 Jan, 2016
Done.
Started working after a few trials with TCPDF settings.
Event switcher action not needed.
Thank you Bob for your prompt support. 😀

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