Title: Conditional Email Output
Last modified: February 28, 2019

---

# Conditional Email Output

 *  Resolved [ocbroadband](https://wordpress.org/support/users/ocbroadband/)
 * (@ocbroadband)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/conditional-email-output/)
 * Hello,
 * I find this very useful. I have a instance in that I have 2 form sections that
   are setup. One or the other is displayed on the selection of a checkbox field.
   So checkbox a, show section 1, checkbox b, show section 2. Simple enough. On 
   the form now being emailed, I can select the option to hide the ‘fields’ if they
   are empty, however, I have headings that I’m placing above each of the fields.
   How would I eliminate the headings/formatting that is part of section 2 if the
   selection was section 1, and vice versa. Or did I miss how to hide these empty
   section headings/formatting in the docs?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/conditional-email-output/#post-11269206)
 * you can use [name-of-your-group] … [/name-of-your-group] in your email body. 
   The part between the tags will only show in the email if the group was visible
   during form submission.
 *  [marinafatbuzz](https://wordpress.org/support/users/marinafatbuzz/)
 * (@marinafatbuzz)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/conditional-email-output/#post-11271601)
 * Hi,
 * Although I am using the group name on the email body, I have the same issue and
   I cannot output the email.
 * Could you please suggest me a solution?
 * UPDATE: Hey I’ve realised that I cannot use the same name field for all the groups;
   therefore, I change it to something like
 *     ```
       [one-tenant]
         Lead Tenant Name: [tenant-1-1-name]
         Lead Tenant Email: [tenant-1-1-email]
         Lead Tenant Telephone Number: [tenant-1-1-telephone-no]
       [/one-tenant]
       [two-tenants]
         Lead Tenant Name: [tenant-1-2-name]
         Lead Tenant Email: [tenant-1-2-email]
         Lead Tenant Telephone Number: [tenant-1-2-telephone-no]
   
         Tenant 2 Name: [tenant-2-2-name]
         Tenant 2 Email: [tenant-2-2-email]
       [/two-tenants]
       ```
   
 * And it works now!
 * Thanks.
    -  This reply was modified 7 years, 3 months ago by [marinafatbuzz](https://wordpress.org/support/users/marinafatbuzz/).
 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/conditional-email-output/#post-11272378)
 * Happy to hear! Feel free to leave a review 😉

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Conditional Email Output’ is closed to new replies.

 * ![](https://ps.w.org/cf7-conditional-fields/assets/icon-256x256.png?rev=2072595)
 * [Conditional Fields for Contact Form 7](https://wordpress.org/plugins/cf7-conditional-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-conditional-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-conditional-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-conditional-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-conditional-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-conditional-fields/reviews/)

## Tags

 * [email](https://wordpress.org/support/topic-tag/email/)

 * 3 replies
 * 3 participants
 * Last reply from: [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/conditional-email-output/#post-11272378)
 * Status: resolved