Include HTML fields and exclude other fields from Gravity Forms notifications

The Gravity Forms {all_fields} merge tag in notifications includes all fields for which the user entered or selected a value, it doesn't include HTML fields, Section Break descriptions, nor does it allow you to omit specific fields from the notification.

By adding the following code to your themes functions.php file you will gain the ability to include HTML fields, and Section Break field descriptions of your choice in the notifications and exclude fields of your choice from appearing in the notifications.

HTML fields will be treated just like any other field so you may want to give them more meaningful labels otherwise the notification will just include the default "HTML Block" label.

Also if your form uses conditional logic and your HTML field is hidden at the time the form is submitted the HTML field will not be included in the notification. Note: gf_exclude does not work with pricing fields.

Original posted on Google+