Adiie9
Web Development

How to Create Custom Template for Gravity Forms Notification

Adeel Ahmed

Adeel Ahmed

IT & Business Enablement Leader

·December 2, 2023·5 min read
How to Create Custom Template for Gravity Forms Notification

Gravity Forms is a great plugin for collecting information on your website through forms and it sends notification emails upon submitting the form but its very basic template.

If you want to change the template for the notification emails, you have to add filter in your functions.php file.

 add_filter( 'gform_notification', 'change_gform_notification_template', 10, 3 );
 
 function change_gform_notification_template( $notification, $form, $entry )
 {
 
  $html_email_start="[ADD_HTML_HERE]";
  $html_email_end="[ADD_HTML_HERE]";
 
  $original_message=$notification['message'];
  //----apply filter the_content
  $original_message=apply_filters('the_content',$original_message);
 
 
  //----add starting HTML + message + ending HTML---
  $notification['message']=$html_email_start.$original_message.$html_email_end;
 
  return $notification;
 
 }

If you are looking for custom made templates for your email, please don't hesitate to contact me.

Share this article

Adeel Ahmed

IT & Business Enablement Leader

IT & Business Enablement Leader and Full Stack Developer with 15+ years of experience delivering scalable, high-performance digital solutions across Pakistan and the UAE. Specialising in React, Next.js, AI integrations, and workflow automation.

You might also like