- 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 #29443AllySupport StaffJune 10, 2019 at 11:53 am #29449
- This topic was modified 1 year, 2 months ago by drebbin. Reason: Link previewed webpage, and covered the question
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 #29455AllySupport StaffJune 10, 2019 at 5:04 pm #29456
- This reply was modified 1 year, 2 months ago by drebbin. Reason: mistake in code
Awesome! Both work perfectly. Many thanks Ally.
- You must be logged in to reply to this topic.