Forums

User Choose To Get Copy of Email

LikeStuff 12 Nov, 2012
I would like to add a "check box" at the bottom of a form so that the user can choose if they wish to get a copy of the email that they are submitting.

How would I get that to work please and thank you!!
GreyHead 13 Nov, 2012
Hi Likestuff,

I'd try using a Custom Code action to set the value of a form->data variable to be used in the Dynamic CC box in the Email action.
<?php
$form->data['cc_email'] = '';
if ( isset($form->data['copy_me'] && $form->data['copy_me'] == 'yes' 
    && isset($form->data['user_email'] && $form->data['user_email'] ) {
  $form->data['cc_email'] = $form->data['user_email'];
}
?>

Then use cc_email in the Dynamic CC box.

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