This filter has been deprecated since Gravity Forms version 1.7. Use the filter gform_notication instead.
Description
Allows the format of the notification email to be changed.
Usage
The following would apply to all forms:
add_filter( 'gform_notification_format', 'your_function_name', 10, 4 );
To target a specific form, append the form id to the hook name. (format: gform_notification_format_FORMID)
add_filter( 'gform_notification_format_1', 'your_function_name', 10, 4 );
Parameters
- $message_format string
The current message format. The options are html or text.
The default is html. - $message_type string
The current message type, either a user notification or admin notification. -
$form Form Object
The current form. -
$entry Entry Object
The current entry.
Examples
add_filter( 'gform_notification_format', 'change_message_format', 10, 4 ); function change_message_format( $message_format, $message_type, $form, $entry ){ return 'text'; }
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in form_display.php in
GFCommon::prepare_user_notification()
GFCommon::prepare_admin_notification()