Hello guys,
I have a page that showing details of a record from database. I didn't use read data option, all I used is using custom code and added PHP to read and echo the records on the page. Now I want to send those info to a specific email. But the problem here is because all of the info generated from my PHP so the auto generate template in the Email function will return empty body. So I need to add the template in the Email function manually. However, I there are some fields which are empty and I don't want to include it in the template. I tried to add php code in the email template but it's not working:
Before the Email action I added a Custom Code and check if the 'hst' data exists or not (if not, I will assign "" or "N/A" value to it). Then I will check it in the email template.
Please help. Thank you.
I have a page that showing details of a record from database. I didn't use read data option, all I used is using custom code and added PHP to read and echo the records on the page. Now I want to send those info to a specific email. But the problem here is because all of the info generated from my PHP so the auto generate template in the Email function will return empty body. So I need to add the template in the Email function manually. However, I there are some fields which are empty and I don't want to include it in the template. I tried to add php code in the email template but it's not working:
<?php
if ($this->data['hst']=="") {
echo "<tr>
<th><strong>HST: </strong></th>
<td>{data:hst}</td>
</tr>'";
}
?>
Before the Email action I added a Custom Code and check if the 'hst' data exists or not (if not, I will assign "" or "N/A" value to it). Then I will check it in the email template.
Please help. Thank you.
This topic is locked and no more replies can be posted.