Hello again,
Thank you for the package. I can't see the custom email that you have made because while creating package that part is removed. Nevertheless, now I understand what you want to achieve so it is not necessary for me to see it.
There isn't a simple option to achieve what you want in Advanced > More options > MailBack Emails.
To do what you want you have to create a mailback email template as explained here
crosstec.org/en/support/online-documenta...-templates-work.html
. I will explain a bit more how to do it.
I will put here an example of mailback template that you have to name FORMNAME_mailback.html.php and put in /media/breezingforms/mailtpl/ folder.
This is an example for a form that includes textfield "name" and checkbox named "check" . If the field "name" is filled it will print out the name and if the checkbox is checked it will show some additional text.
<?php
//set variables for every element in your form
$nameTitle = '';
$name = '';
$checkTitle = '';
$check = '';
if (count($MAILDATA)){
foreach ($MAILDATA as $data) {
$title = wordwrap(htmlentities($data[_FF_DATA_TITLE], ENT_QUOTES, 'UTF-8'), 40, '<br />', true);
$value = nl2br(htmlentities(substr(is_array($data[_FF_DATA_VALUE]) ? implode('|',$data[_FF_DATA_VALUE]) : $data[_FF_DATA_VALUE],0,10000), ENT_QUOTES, 'UTF-8'));
switch($data[_FF_DATA_NAME]){
case 'name': //replace name with name of another element, LITTERALLY
$nameTitle = $title;
$name = $value;
break; //add a case for every element in your form
case 'check':
$checkTitle = $title;
$check = $value;
break;
}
}
}
?>
<?php if ($name!= '') { echo $nameTitle.": ". $name; ?> <br> <?php } ?>
<?php if ($check!= '') { echo "Here is some additional info!"; } ?>
First, define empty variables for each field of your form that you want to have in the email.
In the IF and FOREACH statement you will take each value from the form and using the SWITCH-CASE statement, each value will be saved in the corresponding variable in the template. Here it is important to put the Names of elements of your form literally into cases.
Finally, if the checkbox is checked add the text that you want.
I hope this will help you. If you have more questions, feel free to ask.
Regards,
Mihaela