- June 3, 2019 at 4:44 pm #29415
Similar to the QuForm WordPress question:
How can I hide a table row in emails/notification.php if certain input fields are empty? e.g. If checkbox for product01 is unchecked, the row with product01’s title, quantity and price values is hidden.
Huge thanks in advance. 🙂
June 10, 2019 at 9:54 am #29443
- This topic was modified 2 months, 3 weeks ago by drebbin. Reason: Link previewed webpage, and covered the question
AllySupport StaffJune 10, 2019 at 11:53 am #29449
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>
June 10, 2019 at 4:30 pm #29455
- This reply was modified 2 months, 2 weeks ago by drebbin. Reason: mistake in code
AllySupport StaffJune 10, 2019 at 5:04 pm #29456
Awesome! Both work perfectly. Many thanks Ally.
You must be logged in to reply to this topic.