# How to Omit Line Item from Order Field \[RESOLVED\]

**URL:** <https://community.gravityforms.com/t/how-to-omit-line-item-from-order-field-resolved/10623>\
**Category:** Get Help\
**Tags:** custom, gform\_display\_product\_summary\
**Created:** [August 24, 2021, 6:54pm UTC](https://community.gravityforms.com/t/how-to-omit-line-item-from-order-field-resolved/10623 "2021-08-24T18:54:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AeroStar](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/aerostar/32/15243_2.png) [@AeroStar](https://community.gravityforms.com/u/AeroStar)\
**Post date:** [August 24, 2021, 6:54pm UTC](https://community.gravityforms.com/t/how-to-omit-line-item-from-order-field-resolved/10623/1 "2021-08-24T18:54:21Z")

</div>

Good Day!

Hey, does anyone know how to omit a particular line item from the Order field when {all fields} is used in a Notification email? Specifically, see below.

If there’s a filter or code snippet out there, please share. We couldn’t find one. And since we’re not coders, if you do share one, please let us know which is the “placeholder” variable that we need to change.

Thank you!

![gravity-forms-omit-line-item-from-order-field](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/0/0ec0e8877d02c10fd499afe4e15a6d31e93e9b21.png)

---

<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:** [August 25, 2021, 12:18am UTC](https://community.gravityforms.com/t/how-to-omit-line-item-from-order-field-resolved/10623/2 "2021-08-25T00:18:07Z")

</div>

Hi Jonathan. The pricing table is non-modifiable. What you can do is suppress the table altogether using this filter:

> **[gform\_display\_product\_summary](https://docs.gravityforms.com/gform_display_product_summary/)**
>
> This filter can be used to prevent the pricing summary being included in the output generated when using the {all\_fields} merge tag.

This is the code you would add to your theme functions.php file (or functionality plugin) to disable the pricing summary table for form 16:

```auto
add_filter( 'gform_display_product_summary', function( $display_product_summary, $field, $form, $entry ) {
 
    return $form['id'] == 16 ? false : $display_product_summary;
}, 10, 4 );

```

Then, those pricing fields will be part of the body of the email. To conditionally hide the field when that “No thanks” option is submitted, you can use the conditional merge tag in your notification to hide that field output when the value matches:

> **[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.

Without seeing your form, it’s hard to say exactly how the shortcode needs to be configured to match that value. If you need assistance, please let us know where we can take a look at the form.

---

<div class="post-metadata">

**Author:** ![AeroStar](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/aerostar/32/15243_2.png) [@AeroStar](https://community.gravityforms.com/u/AeroStar)\
**Post date:** [August 25, 2021, 4:50pm UTC](https://community.gravityforms.com/t/how-to-omit-line-item-from-order-field-resolved/10623/3 "2021-08-25T16:50:31Z")

</div>

Hi Chris,

Yeah, you’re a genius too! 🕶 Worked like a charm. Thank you.

Would be great if GF developed a filter or conditional shortcode to omit from the Product table any item with a Price field value of zero (0). Having the Order field (i.e., Product table) at the bottom of the Notification email is kinda nice. Can’t be that hard, is it?

Again, thank you.

Jonathan

---

<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 26, 2021, 4:51pm UTC](https://community.gravityforms.com/t/how-to-omit-line-item-from-order-field-resolved/10623/4 "2021-08-26T16:51:21Z")

</div>

Closed on August 26, 2021, 4:51pm UTC

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