Reply To: Hide table row if input value is empty, in e-mail notification?

Home Forums Quform PHP Hide table row if input value is empty, in e-mail notification? Reply To: Hide table row if input value is empty, in e-mail notification?

#29449

drebbin
Participant

Thanks Ally, this is very useful, and I’ve used the code in the emails/notification.php (see below).

I’m trying to get the form results to display in a row for each product, not possible if I use the the code above in process.php.
e.g. Basically a tidy way to do this…

<table>
<?php if ($form->getElement('product01')->isEmpty()) : ?>
<?php else: ?>
    <tr><td>product01</td><td>title01</td><td>quantity01</td><td>price01</td></tr>
<?php endif; ?>
<?php if ($form->getElement('product02')->isEmpty()) : ?>
<?php else: ?>
    <tr><td>product02</td><td>title02</td><td>quantity02</td><td>price02</td></tr>
<?php endif; ?>
</table>
  • This reply was modified 1 month, 1 week ago by  drebbin. Reason: mistake in code
Be inspired. © 2019 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy