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.
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.
Hi Mike, here is the URL I have the code in: http://www.fitnessguruusa.com/excercises/questionnaire/
It seems to be posting to the Google spreadsheet. However, I am not receiving any email notifications and the redirect to the confirmation page is not happening.
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:
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?
That’s great! I would certainly be willing to try it out.
I am pretty close to having an option to request the user supply an email address when submitting the form. If the user is logged in, the email address field will pre-populate with that address otherwise it will be blank. The form will not submit until the user provides a validly formed email address. I have it mostly working but the validation conflicts with the CAPTCHA validation (one or the other works but not both) right now that I know how to solve but it is taking a little longer than I thought.
Very kind of you to keep me posted! Great to hear it’s progressing. Good luck.
If you want to try it out, I have posted a new beta release!