Skip to main content

Send an Additional Email when a condition on a field is met

Useful for when you want to highlight something or answer a specific query being raised.

Use case here is for BioMin - they wanted an additional email to be sent when a poor revoiew rating was given.

Method:

1.  Create your additional email.

2.   Add some PHP to fire the Additional Email.  Form Properties > PHP Email Scripts > Script called bewfore an Additional Emails are sent - replace the 'fieldname' with the field you are using.

$fieldName = 'rating';

// Don't send an email if rating is higher than 2
if (isset($_POST['form'][$fieldName]) && $_POST['form'][$fieldName] > 2)
{
$additionalEmail['to'] = '';
}
  • Hits: 8