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?
June 10, 2019 at 11:53 am #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 4 years, 9 months ago by drebbin. Reason: mistake in code