# Exclude Notification Field if they a not used

**URL:** <https://community.gravityforms.com/t/exclude-notification-field-if-they-a-not-used/15564>\
**Category:** Get Help\
**Tags:** conditional-shortcode, notifications, disable-default-formatting\
**Created:** [July 20, 2023, 10:50am UTC](https://community.gravityforms.com/t/exclude-notification-field-if-they-a-not-used/15564 "2023-07-20T10:50:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![user648830884d262073](https://avatars.discourse-cdn.com/v4/letter/u/71c47a/32.png) [@user648830884d262073](https://community.gravityforms.com/u/user648830884d262073)\
**Post date:** [July 20, 2023, 10:50am UTC](https://community.gravityforms.com/t/exclude-notification-field-if-they-a-not-used/15564/1 "2023-07-20T10:50:41Z")

</div>

Hi There

I have a Notification where i Placed fields placed:

{Name:103}  
{Flights:125}  
{More1:179}  
{More2:180}  
{Transfers:183}

Now lets say the TAG {More2:180} is not filled in on the forms my Notification will read:

_Jacques_  
_Emirates Airlines_  
_Day Tour_

_Airport Transfers_

I need my Notification to read:

_Jacques_  
_Emirates Airlines_  
_Day Tour_  
_Airport Transfers_

How to I take out {More2:180} in my Notifications?

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [July 20, 2023, 5:32pm UTC](https://community.gravityforms.com/t/exclude-notification-field-if-they-a-not-used/15564/2 "2023-07-20T17:32:57Z")

</div>

You can use conditional shortcodes around those merge tags, so they are only output when they contain a value. See the documentation here:

> **[Conditional Shortcode](https://docs.gravityforms.com/conditional-shortcode/)**
>
> The conditional shortcode allows you to perform conditional logic in the message content of your Admin and User Notification emails as well as the Confirmation Message that is displayed when a form is submitted.

Let us know if you have any questions setting that up.

---

<div class="post-metadata">

**Author:** ![user648830884d262073](https://avatars.discourse-cdn.com/v4/letter/u/71c47a/32.png) [@user648830884d262073](https://community.gravityforms.com/u/user648830884d262073)\
**Post date:** [July 21, 2023, 9:37am UTC](https://community.gravityforms.com/t/exclude-notification-field-if-they-a-not-used/15564/3 "2023-07-21T09:37:58Z")

</div>

> [@chrishajer](#):
>
> conditional shortcodes

I’ve checked but its not working.  
My Notification is setup as:

[gravityforms action=“conditional” merge\_tag=“{More 1:128}” condition=“isnot” value=“”]{More 1:128}` `[/gravityforms]  
[gravityforms action=“conditional” merge\_tag=“{More 2:130}” condition=“isnot” value=“”]{More 2:130}` `[/gravityforms]  
[gravityforms action=“conditional” merge\_tag=“{More 3:131}” condition=“isnot” value=“”]{More 3:131}[/gravityforms]

When I fill in all the fields  
More 1 = Flights  
More 2 = Transfers  
More 3 = Tour  
my Notification says:  
_Flights_  
_Transfers_  
_Tour_

When I fill in all the fields  
More 1 = Flights  
More 2 =  
More 3 = Tour  
my Notification says:  
_Flights_

_Tour_

I need to know how do I Remove the LINE from Flight and Tour?  
My Notification must read:  
_Flights_  
_Tour_

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [July 21, 2023, 11:03pm UTC](https://community.gravityforms.com/t/exclude-notification-field-if-they-a-not-used/15564/4 "2023-07-21T23:03:18Z")

</div>

You can check the box “Disable auto-formatting” and the line breaks will not be converted to HTML br and p tags. Then you have to add all your own HTML markup, because WordPress won’t do any of it.

You may have to experiment a bit to ensure you have the line breaks where you want them still.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [August 20, 2023, 11:03pm UTC](https://community.gravityforms.com/t/exclude-notification-field-if-they-a-not-used/15564/5 "2023-08-20T23:03:52Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
