wuschel_lux
Member
Hi all,
I struggle with a custom e-mail template. I started this to have a bit CSS included.
I have a part where I ask in the form if parent address is same as kids address and depending on this vaiables value I want to show a text: same ass kid or if different show the parents address.
Here en extract of the code in the php file, possible values for {vaa_camp_reg___same_address_raw} can be: diff_addr | same_addr
But when I test both options, the else part is never executed.
Do I have something written not correctly. I am happy for all suggestions.
BR
I struggle with a custom e-mail template. I started this to have a bit CSS included.
I have a part where I ask in the form if parent address is same as kids address and depending on this vaiables value I want to show a text: same ass kid or if different show the parents address.
Here en extract of the code in the php file, possible values for {vaa_camp_reg___same_address_raw} can be: diff_addr | same_addr
HTML:
<p>
Your registration details:
<h2>MAIN CONTACT PERSON</h2>
<ul>
<li><b>{vaa_camp_reg___first_name_contact} {vaa_camp_reg___last_name_contact} ({vaa_camp_reg___relation_contact})</b></li>
<li>E-Mail: <b>{vaa_camp_reg___email_contact}</b></li>
<li>Phone: <b>{vaa_camp_reg___phone_contact} / {vaa_camp_reg___phone_emc_contact}</b></li>
<?php
$myVarRaw = '{vaa_camp_reg___same_address_raw}';
if( strpos($myVarRaw, 'same') !== false ){
echo '<li>Address: <b>{vaa_camp_reg___same_address}</b></li>';
} else {
echo '<li>Address: <b> {vaa_camp_reg___address_contact}<br>
{vaa_camp_reg___zip_contact} {vaa_camp_reg___city_contact}<br>
{vaa_camp_reg___country_contact}
</b>
</li>';
}
echo '<li>myVarRaw = '.$myVarRaw.'</li>';
?>
</ul>
But when I test both options, the else part is never executed.
Do I have something written not correctly. I am happy for all suggestions.
BR