Forums

Send email to customer if Checkbox is checked

mskarka 06 Jan, 2016
Hi,
I tried to search for this answer but I found only old topic that didn't helped me so I'll try to ask here. How can I send e-mail to customer ONLY if he check the checkbox which is in the form?

I thought that I can have "Action" e-mail that would be enabled only on the check by event IN the checkbox, but that didn't worked for me.

Any help please? Thank you.
jj135 25 Jan, 2016
I have the same question. I have a dropdownfield (yes/no). If 'yes' the next field displays. This is an e-mail field, required. I only want to send an e-mail to the person who checked 'yes' to receive an e-mail. How do I go about this?
jj135 25 Jan, 2016
OK, found this already! I put the 'Event Switcher' in the Onsubmit (on Server Validation - Success) with this code:

<?php
if ( $form->data['vr_05_01']=="ja" && !empty($form->data['email']) ) {
  return 'success';
}
?>


The' vr_05_01' is my yes/no field. The second argument is the e-mail field.
Then I put the e-mail action in the 'onsuccess' part of the Event Switcher.

Seems to work OK!
This topic is locked and no more replies can be posted.