Conditional Email content

kraadde 30 Mar, 2017
Hallo

I need to make the content of the email partly depending on some checkboxes or radiobuttons.
I tried following in the email template, but the if condition seems not to work. BTW the variable mitgliedwerden is a checkbox with a field value 1. I also have a radiobutton condition which I need to use for some part of the content
<table>
<tr><td></td><td>{custom}</td></tr>
<tr><td>Name:</td><td>{name}</td></tr>
<tr><td>Strasse / Ort:</td><td>{adresse}</td></tr>
<tr><td>Email:</td><td>{email}</td></tr>
<tr><td>Betreff:</td><td>{betreff}</td></tr>
<tr><td>Nachricht:</td><td>{nachricht}</td></tr>
<?if (mitgliedwerden == 1) {?>
<tr><td>Ich möchte Mitglied werden</td><td>{mitgliedwerden}</td></tr>
<tr><td>Mitgliedschaft: </td><td>{radio17}</td></tr>
<tr><td>Erwachsene im gleichen Haushalt:</td><td>{erwa}</td></tr>
<tr><td>Kinder im gleichen Haushalt:</td><td>{kind}</td></tr>
<?}?>
</table>



Any solution idea for my task
GreyHead 30 Mar, 2017
Hi kraade,

Please try
<?php
if ( $form->data['mitgliedwerden'] == 1 ) {
?>
. . .
<?php
}
?>

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