Custom code doesn't work

boeschung 30 Jun, 2014
Hello,

customers shall have the opportunity to click a checkbox to get a copy of the email. I used a custom code action with the following code (placed before email action):

<?php
if (!empty($form->data['checkbox12'])) {
$form->actions_config[0]["dto"] = "{field_email}";
$form->actions_config[0]["dsubject"] = "[Kopie] {field_subject}";
}
?>


I took the ID from email action. It doesn't work.

Have you any suggestions?

Best regards
Alfred
boeschung 02 Jul, 2014
No hint or any suggestions?

Best regards
Alfred
GreyHead 02 Jul, 2014
Answer
Hi Alfred,

It looks as though you have found a bit of code from CFv3. In CFv5 there is an Event Switcher action which will handle this for you. Please see this FAQ

Bob
boeschung 02 Jul, 2014
Ah, okay. The Event Switcher is the solution :-)

Best regards
Alfred
This topic is locked and no more replies can be posted.