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.

Hook to filter email notification message

  1. A client requires us to encrypt a couple secure forms of theirs using PGP, and I'm actively seeking a way of hooking into the notifications and encrypting the notification message.

    I can't seem to find a hook that has the notification object that would allow me to edit it. The Pre Submission hook contains the object but only contains {all fields} or some such as the content. Is there a hook for me to change this data as the notification message after the message has been populated but before it is sent?

    Posted 13 years ago on Wednesday April 27, 2011 | Permalink
  2. Are you only wanting to encrypt the notification message or are you wanting to encrypt the form field values themselves?

    Posted 13 years ago on Wednesday April 27, 2011 | Permalink
  3. Hi Carl,

    Thanks for the quick response.

    We want to encrypt the entire message.

    Posted 13 years ago on Wednesday April 27, 2011 | Permalink
  4. If you want to encrypt all of the field data this is a little more involved. There are hooks there to do it but you need to handle the encryption and decryption yourself. How fluent in PHP and WordPress development are you?

    Posted 13 years ago on Wednesday April 27, 2011 | Permalink
  5. Fairly proficient, I can handle the encryption part using PHP's GnuPG library. I'd like to find a hook after gravity form does it's parsing magic of filling the form data, but before it gets sent. Barring that, I can probably just build the form from scratch (Assuming my changes in pre_submission_filter don't get overwritten later in the process). I'd rather not do extra work, and if they add fields to the form later that would require me changing code each time. :(

    I've been meaning to look through the source code and take a look but it's been a busy day. :)

    Posted 13 years ago on Wednesday April 27, 2011 | Permalink
  6. I'll have to have one of our developers write up a quick run down of what you would have to do as far as what hooks you would have to use, etc. This may take a little time to put together.

    Posted 13 years ago on Wednesday April 27, 2011 | Permalink
  7. Great, thank you so much, Carl!

    Posted 13 years ago on Wednesday April 27, 2011 | Permalink
  8. Hey Carl, as an update I peeked around in the code and decided to extend the GFCommon class and used the gform_disable_admin_nofitifcation filter and did something like here: http://pastebin.com/qgTgLwPf"
    It's a bit clunky though and would mean I have to update it with Gforms. If the developer knows of a better way, I'm all ears!

    Thanks again for your time.

    Posted 13 years ago on Wednesday April 27, 2011 | Permalink
  9. Hey guys - I have a client who has a similar request. They'd like to have all data fields encrypted in an email message. How are Gravity Forms developers doing this?

    Posted 13 years ago on Tuesday July 19, 2011 | Permalink
  10. I'd also be curious how people can make the registration of users secure: http://www.gravityforms.com/add-ons/user-registration/

    Posted 13 years ago on Tuesday July 19, 2011 | Permalink
  11. If you want to encrypt field data you have to use custom code to encrypt it before it's saved, and decrypt it before it is displayed. There are hooks available to do this, but it does require custom code. There isn't currently an Add-On for configuring encryption, although it is on our To Do list as it would make a great Add-On.

    I'm not sure what you mean by make the registration of users secure. Do you mean make the form secure? That would be a matter of implementing an SSL certificate on your site and calling the page containing your registration form via an https:// connection.

    If you mean the users registration information, it uses the built in WordPress registration functions so the password storage and user creation part of the registration is already going to be secure.

    Posted 13 years ago on Tuesday July 19, 2011 | Permalink
  12. Carl - Thanks so much! Do you by chance have a recommendation for a developer who knows who to encrypt forms?

    Posted 13 years ago on Tuesday July 19, 2011 | Permalink
  13. I don't have any specific recommendations as I don't know for sure who has or hasn't done this type of customization. But here are some developers with Gravity Forms customization experience:

    Ounce of Talent
    http://www.ounceoftalent.com

    WebDevStudios
    http://www.webdevstudios.com

    Scott Kingsley Clark
    http://scottkclark.com

    A larger list of WordPress developers who work with Gravity Forms can be found here:

    http://wpcandy.com/pros/experienced/with-gravity-forms

    Posted 13 years ago on Tuesday July 19, 2011 | Permalink