Hi,I'm trying to send a nice formatted email. The issue is the repeater.
- the data of each repeater isn't stored in a multidimentional array, therefore i need to add a php action to make it. not a big problem.
- when sending the email, I want to loop the data into an html table but email action does not execute php.
this is part of my code. in php action, it prints well. moving it to the email action returns a sanitized php code.
$data = $this->data;
$fields = ['chem_name', 'cas_no', 'chem_qty', 'chem_pkg_size', 'chem_clean_rate', 'chem_notes']; // these are my fields in the repeater
$rows = count($data['chem_name']); // this counts the number of repeats cause we don't know
for ($i = 1; $i <= $rows; $i++) { echo '<tr>'; foreach ($fields as $field) { echo '<td>' . htmlspecialchars($data[$field][$i]) . '</td>'; echo '</tr>';}
putting this in email body, does not work: <?php echo '<h1>test</h1>';?>