Gravity forms email template

May 2024 ยท 2 minute read

I have a multisite with notifications that will send an email to the user once they completed a specific form. On avarage about 10 notifications per site (10 sites). So A LOT of notification emails.

I want to make a few small style changes to email notifications setup in gravity forms. Just font size, color and family. I know I can just do this with inline styling for every notification. But obviously I want to avoid this because its very time consuming.

At the moment the notification is just plain tekst, no custom styling whatsoever. The email must be build up somewhere so I've been looking through the plugin files to find the location but I am unable to find it.

Does anyone know where to find the email template? If I know where the email is being generated I can just wrap the email in a div and apply the styles there.

2

2 Answers

The development team do plan on making the output of merge tags such as the {all_fields} tag templatable in a future version. It's currently generated by the get_submitted_fields function in common.php but I would strongly advise against editing plugin files as your changes will be lost during updates and you should always keep WordPress and plugins updated.

In Gravity Forms 1.8.6 they did add a couple of hooks for changing the colors:

- Added new filter "gform_email_background_color_label" to change the background color for the field label in the html email. add_filter("gform_email_background_color_label", "set_email_label_color", 10, 3); function set_email_label_color($color, $field, $lead){ return "#CC99FF"; } - Added new filter "gform_email_background_color_data" to change the background color for the field data in the html email. add_filter("gform_email_background_color_data", "set_email_data_color", 10, 3); function set_email_data_color($color, $field, $lead){ return "#CCCCFF"; } 

There is also the gform_merge_tag_filter hook which can be used to change the output generated by merge tags: http://www.gravityhelp.com/documentation/page/Gform_merge_tag_filter

I know this answer comes late, but this question still shows up in Google when searching for "gravity forms email template"...

WP HTML Mail, my plugin, supports GravityForms forms now and it is free.

https://wordpress.org/plugins/wp-html-mail/

1

ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJoaWxxYWWEeIOOoKmarpmpxm6yzqukrGWVoq6quIytnKaonJbBpg%3D%3D