Forums

scinti 23 Nov, 2016
Hi everybody,
i cannot find what i'm looking for, so i have to open a new topic.
I need to send different mail based on what the user choose on a checkbox group. There are just 2 choices, i.e. the user selects the first he/she will receive a specific mail with specific content and link for the choice.

Is there a way to do it? I've made some trials but none seemed to work.
Thank you and have a good day
GreyHead 23 Nov, 2016
Hi scinti,

That should probably be a radio button group - not a checkbox group from what you are saying.

You na do this using an Event Switcher action in the form On Submit event. Set the action up with one event - send-email - and add the email action to the send_email event. In the Event Switcher add code to check the radio button value something like this
<?php
if ( $form->data['radio_buttom_name'] == 'send' ) {
  return 'send_email';
}
?>

Bob
scinti 23 Nov, 2016
It was a checkbox group, but anyway I've changed with a radio button. I kept 0 and 1 as back value.
I've create the event switcher and set-up just the email "on success" and left empty the "on fail".
I've also added that code in the "Event switcher" properties, changing the radio_button_name with "radio11" that is mine and changed the send_email with my action label in the "on success" field.
    <?php
    if ( $form->data['radio11'] == 'send' ) {
      return 'email_pieno';
    }
    ?>

But I still don't get any mail.
Have I done some mistake? Do you have any other idea?
GreyHead 23 Nov, 2016
Hi scinti,

It looks as if the value of your radio button is 1 (not send); and the event you want to call is success (and not email_pieno).

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