The “gform_html_message_template_pre_send_email” filter in Gravity Forms allows the template for the HTML-formatted message to be overridden.
CARVIEW |
Select Language
HTTP/2 200
date: Mon, 13 Oct 2025 03:43:36 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
vary: Accept-Encoding
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
link: ; rel="https://api.w.org/"
link: ; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
fastcgi-cache: HIT
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=AG1mwtGAhv61jwOEbtP%2FqNySHMDGNUA4ImVbkyV4QLPyhgy4Eof2ZT4m%2BtKyJCydCVL1pKmlANP7%2BDhNz%2BaJjIaC5quSShkM4ajJ4HjqMumokwTo"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 98dbd566b99e58e1-BLR
gform_html_message_template_pre_send_email - Gravity Forms
gform_html_message_template_pre_send_email
Usage
add_filter( 'gform_html_message_template_pre_send_email', 'notification_template' ); function notification_template( $template ) { $template = ' <html> <head> <title>{subject}</title> </head> <body> {message} </body> </html>'; return $template; }
Parameters
-
$template string
The template for the html formatted message. Use {message} and {subject} as placeholders.
Source
- common.php