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.

gform_after_submission and notification message re-use

  1. I modified notification message to a special format with merge tags. Works fine and goes to email as supposed with right values.

    I'd also like to save this info to a file to server. I can't find this formatted message from any variable. Can this be re-used as it is? Now I would have to create this file again inside gform_after_submission and make changes twice if needed. It would be so cool to use that one message without modifying the hook every time.

    Posted 11 years ago on Monday January 14, 2013 | Permalink
  2. Where is the notification message stored now, and how are you using it as a notification now? Is it just in the database as part of the form you initially created it for?

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink
  3. It's in form's Notifications > Message -field which goes to email. It's formatted as xml like <element_1>{Field name:2}</element_1> (with Insert Merge tag). Of course I can get it from $form['notification']['message'] but can I have it evaluated like goes to email?

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink
  4. I'm not clear still on what you want to do. You have your notification in exactly the format you want it. Are you saying in addition to sending that notification, you want to write that exact same information (what would be sent in the body of the email) to a file on the server?

    Posted 11 years ago on Tuesday January 15, 2013 | Permalink
  5. That is what I tried to say :) I didn't find that under any hook or variable. (Mail is send as info about new item and file from server will be read automaticly to crm.) If the message could be used directly anyone could modify it without need to change the code.

    Posted 11 years ago on Wednesday January 16, 2013 | Permalink
  6. Are you saying that you WANT to allow it to be used directly? So the CRM can pick it up?

    You can use the gform_after_submission hook to write a file on the server: http://www.gravityhelp.com/documentation/page/Gform_after_submission

    The information in the notification is available in the $form['autoResponder']['message'] (that is the user notification) or the $form['notification']['message']. However, those messages will not have the merge tags replaced with actual data.

    I'm still not clear exactly what you want to accomplish, but I will try to help with as much information as I can.

    Posted 11 years ago on Wednesday January 16, 2013 | Permalink
  7. Thanks for this. Actually did my own coding eventyally and matched the contents and the fields manually.

    Posted 11 years ago on Friday February 22, 2013 | Permalink
  8. Thank you for the update.

    Posted 11 years ago on Saturday February 23, 2013 | Permalink