screenshot
Screenshot of the webform emails admin interface

webform_confirm_email is a simple addon module for the webform module. You can define webform emails that are only sent when the user klicked on a link that he/she got in an other webform email. You can use this module to implement a double opt-in.

Hooks are provided to react when an email address was confirmed. Also a rules event is provided.

Dependencies

webform-7.x-4.x

How it works

Normally, when you define an email in webform this email email will be send immediately when the user clicked the webform submit button.

This module allows you to let webform send some of the emails and keep back others that will be sent later once the email address was confirmed.
The confirmation is done by the email(s) that are sent immediately after submission. They contain a link where the user can click on. When the user clicks the link from his/her email the webform email that was previously kept back will now be send.

How to configure

Lets assume your site has the domain www.example.net and you defined a webform on node 99.

As usual, navigate to the webform email settings, that is starting from

www.example.net/node/99

click on the Webform tab and then on the E-Mails link.

You now see 3 tables, 1 for Standard emails, 1 for Confirmation request emails and 1 for Confirmation emails.

Standard emails are normal webform emails as you know it.
Confirmation request emails are webform emails that are send immediately after submission, they should contain the confirmation link.
Confirmation emails are webform emails that are only sent when the user clicked on the confirmation link that he/she got in the Confirmation request email.

Standard emails and Confirmation emails have the same configuration as you know it from webform.

Confirmation request emails have 1 additional option, the Set the redirect URL. Here you can specify an URL where the user will get redirected to after he/she clicked on the confirmation link.
Further note, that you are expected to include the token for the confirmation link ([submission:confirm_url]) in the email body.

If you are in the E-mails settings overview, you can see a link labled Confirmation mail settings. Here you can specify how long webform_confirm_email remembers about confirmation requests before it deletes them. If you leave the fields blank the data will be kept forever.
If you set an expiration time here only the internal "accounting" data is deleted, not the submissions. If you want to delete the submissions too then check the checkbox below.

The 7.x-1.x and 7.x-2.x versions also provide filtering in the webform results tabs. From viewing the node click on the Results tab. In the Submissions and Table subsections you can filter for Only confirmed submissions or Only unconfirmed submissions. In the Download subsection in the Download range options you can also filter the submissions to download to only confirmed or unconfirmed submissions.

For developers

Hooks:

  • hook_webform_confirm_email_email_confirmed($node, $submission)
  • hook_webform_confirm_email_request_expired($expired_submissions)

Further documentation for these hooks can be found in the webform_confirm_email.api.php file.

Provided rules event: webform_confirm_email_email_confirmed

Project information

Releases