How to Omit Line Item from Order Field [RESOLVED]

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!


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

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:

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:

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.

1 Like

Hi Chris,

Yeah, you’re a genius too! :sunglasses: 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.


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