chronoformsv5 - how to retrive current email user and send email as a copy

57 Views Asked by At

I'm writing a form with chronoformsv5.

I need to send a CC email to the current user email, so I did:

  1. hidden field with this value

    Field Name = current_user_email
    Field ID = current_user_email
    Field Value = <?php echo $current_user_email; ?>
    
  2. on OnLoad action a create a new action with this code

    <?php
    $user = JFactory::getUser();
    $current_user_email = $user->email;
    //echo $current_user_email;
    ?>
    
  3. onSubmit action I create use "email Action" with this value

    Dynamic To = current_user_email
    Reply To Email = [email protected]
    
1

There are 1 best solutions below

0
GreyHead On

Please see this FAQ. You do not need to get this information until after the form is submitted.