PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

How do I Email Notes to Admin using Resend Notification

  1. Once a note is added to an entry, when we hit Resend Notification to Admin, I'd like to append the Notes to the original message. I am using gform_before_resend_notifications to modify the message and the subject, but how do I access the Notes to include them programatically? I cannot figure out the object to use.

    Posted 11 years ago on Wednesday February 20, 2013 | Permalink
  2. Or perhaps someone knows a better way to update the entry once it has been reviewed by our staff, and then send it back out to the admin?

    Posted 11 years ago on Thursday February 21, 2013 | Permalink
  3. I would also like to know this..

    Posted 11 years ago on Monday March 4, 2013 | Permalink
  4. There is not currently a way to do this. It's not a feature of Gravity Forms.

    Posted 11 years ago on Tuesday March 5, 2013 | Permalink
  5. Turns out through priority help from Alex I was able to get a work around. Here is my final code to create a new merge tag that pulls the entry notes and include them in email:

    [php]
    add_filter('gform_custom_merge_tags', 'custom_merge_tags', 10, 4);
    function custom_merge_tags($merge_tags, $form_id, $fields, $element_id) {
    	$merge_tags[] = array('label' => 'Entry Notes', 'tag' => '{entry_notes}');
    	return $merge_tags;
    }
    
    add_filter( 'gform_replace_merge_tags', 'replace_entry_notes', 10, 7 );
    function replace_entry_notes( $text, $form, $entry, $url_encode, $esc_html, $nl2br, $format ) {
    	$custom_merge_tag = '{entry_notes}';
    
    	if ( strpos( $text, $custom_merge_tag ) === false ) {
    		return $text;
    	}
    
    	$notes = RGFormsModel::get_lead_notes( $entry['id'] );
    
    	$entry_notes = '';
    	if ( $notes ) {
    		$entry_notes .= "<br><br><strong>Additional Notes</strong><br>";
    		foreach ( $notes as $note ) {
    			$date = new DateTime( $note->date_created, new DateTimeZone( 'Europe/London' ) );
    			date_default_timezone_set( 'America/New_York' );
    			$entry_notes .= "<em>" . $note->user_name . ' - ' . date( 'F j, Y, g:i a', $date->format( 'U' ) ) . "</em><br>";
    			$entry_notes .= $note->value . "<br><br>";
    		}
    	}
    
    	$entry_notes = str_replace( $custom_merge_tag, $entry_notes, $text );
    
    	return $entry_notes;
    }
    Posted 11 years ago on Wednesday March 6, 2013 | Permalink
  6. Thank you for posting an update. I'm glad Alex provided a solution for us.

    Posted 11 years ago on Tuesday March 12, 2013 | Permalink

This topic has been resolved and has been closed to new replies.