Hey there,
I would like to build the e-mail template with an php request, to hide the field {recipient1} if this is empty.
This is my code to do this
After I update my e-mail template this is the result:
Where is my mistake?
Can anybody help me?
Best regards
Chris1984NRW
I would like to build the e-mail template with an php request, to hide the field {recipient1} if this is empty.
This is my code to do this
<?php
echo "<table border='0' cellspacing='5' cellpadding='5'>";
echo "<tbody>";
echo "<tr>";
echo "<td><strong>Name*</strong></td>";
echo "<td>{input_name}</td>";
echo "</tr>";
echo "<tr>";
echo "<td><strong>E-Mail*</strong></td>";
echo "<td>{input_email}</td>";
echo "</tr>";
echo "<tr>";
echo "<td><strong>Fanclub</strong></td>";
echo "<td>{input_fanclub}</td>";
echo "</tr>";
echo "<tr>";
echo "<td><strong>Spiel</strong></td>";
echo "<td>{input_spiel}</td>";
echo "</tr>";
echo "<tr>";
echo "<td><strong>Einstiegsort</strong></td>";
echo "<td>{input_einstiegsort}</td>";
echo "</tr>";
if ( isset($form->data['recipient1']) && $form->data['recipient1'] )
{
echo "<tr>";
echo "<td><strong>Mitfahrer 1</strong></td>";
echo "<td>{recipient1}</td>";
echo "</tr>";
}
echo "</tbody>";
echo "</table>";
?>
After I update my e-mail template this is the result:
"; echo ""; echo ""; echo "Name*"; echo "{input_name}"; echo ""; echo ""; echo "E-Mail*"; echo "{input_email}"; echo ""; echo ""; echo "Fanclub"; echo "{input_fanclub}"; echo ""; echo ""; echo "Spiel"; echo "{input_spiel}"; echo ""; echo ""; echo "Einstiegsort"; echo "{input_einstiegsort}"; echo ""; if ( isset($form->data['recipient1']) && $form->data['recipient1'] ) { echo ""; echo "Mitfahrer 1"; echo "{recipient1}"; echo ""; } echo ""; echo ""; ?>
Where is my mistake?
Can anybody help me?
Best regards
Chris1984NRW