Contact Form 7 hide empty fields and parent elements (2 posts)

  1. Jacob Roman
    Posted 2 years ago #


    I am using contact form 7 and have a long form with lots of text fields. I am looking for a way to only show fields that the user fills out in the email. I came across this link:


    But it does not quite work for me because I have my email body set up like this:

    <tr style="border:1px solid;">
    <th style="background:#000; color:#fff;">Item</th>
    <th style="background:#000; color:#fff;">Qty</th>
    <tr style="border:1px solid #ccc;">
    <td>Aerobic Culture Swab</td>
    <tr style="border:1px solid #ccc;">
    <td>Alcohol Prep Pad</td>
    <tr style="border:1px solid;">

    So i need the parent tr to hide if the field is empty. Any suggestions?

  2. lridgecooke
    Posted 2 years ago #

    Hi Jacob,

    Did you find an answer to your problem? I am now facing the same issue.

    Cheers Leon

Topic Closed

This topic has been closed to new replies.

About this Topic