wpGForm now has email notification

I’ve received a couple of requests to have an email notification sent out when a form is submitted. Today I released v0.26 which supports a new attribute (email=’on|off’) on the gform shortcode. By default email notification is off but when set to on, an email to the blog administrator will receive an e-mail indicating a form was submitted. The email also contains the URL for the form, and date and time the form was submitted.

While I was working on this version, I also decided to see if I could make the custom confirmation work like my original implementation which did not use a Javascript redirect.  I had switched to the redirect when I added support for multi-page forms because the mechanism I was using previously no longer worked.

Email can be sent in either HTML or Plain Text formats, there is a new option on the settings page.  By default email notifications are sent in HTML format.

The v0.26 version switches from a Javascript redirect to an Ajax page load using jQuery.  In my testing it seems to work pretty well and is much less intrusive than the redirect was.  Let me know if you run into any problems with it.

The v0.26 release is now available from the WordPress plugin repository and an update will appear on your WordPress Dashboard.

11 thoughts on “wpGForm now has email notification

  1. Hi Mike, thanks for the email addition. I am working on this now and have updated the plugin. However, when I go to grab the gform code under “Usage” it doesn’t show the new attribute (email=’on|off’) – it is not in the code. Should I add it? If so, where? Here is what is currently available: [gform form=” confirm=” class=” legal=’on|off’ br=’on|off’ prefix=” suffix=”]

    • Good catch, I need to update the documentation. In the meantime, you would add it just like any of the other attributes:

      [gform form='<some Google URL>' legal='off' email='on']

      Thanks to WordPress, the actual order of the attributes doesn’t matter, the parser will pick it up anywhere in the short code.

  2. Hey, is it currently possible to send a confirmation email to the user of the form, rather than the site admin?

    • It isn’t currently possible to do this. I’ve considered it previously but it would require that the user is logged into the site which most WordPress sites don’t require. I wasn’t really sure how to handle the situation where “cc-mail-to-user” was enabled but the user wasn’t logged in so I never implemented it.

      • Ah, I see. Well, I was thinking you could simply have an e-mail field for the user to fill in. Anyway thanks for the quick reply! 🙂

        • Now that you mention it, I could probably do that because:

          1. I am already adding fields to the form to support CAPTCHA so I know how to do this.
          2. Because CAPTCHA required me to re-introduce the jQuery validation plugin I could use it to validate an email address too.

          I’ll see if this is something I can work out in the next day or two. Are you will to try a beta version when I get something running?

Leave a Reply