My client would like to predefine the subject (and message) when they update the notes in the WordPress admin.
It's a gardening site and they want to have a bunch of boiler plate text (predefined) then the custom notes text then some more boilerplate.
I've looked at a bunch of hooks (gfrom_notification, gform_pre_submission) that look promising but they don't actually seem to run on the admin side. At least I'm not seeing any changes in the subject and messages that are getting sent.
Here are a few code examples.
add_filter( 'gform_pre_submission_filter', array( $this, 'change' ) );
public function change( $form ){
$form['autoResponder']['subject'] = 'custom subject';
return $form;
} // change
and
add_filter( 'gform_notification', array( $this, 'change' ), 10, 3 );
public function change( $notification, $form, $entry ){
$notification['message'] = 'custom message';
return $notification;
} // change
Obviously I'm using both inside a Class calling the filter inside the __construct.