Problem/Motivation

My usecase for this feature is a online protest campaign for NGOs. Collecting protest subscription (and additional user data like address) requires a Double Opt-In for the user submitting the webform.

Proposed resolution

After submitting the form a message is displayed to the user e.g.: To complete your submission please check your mails and confirm your email address.

Mail with confirmation URL is sent to value of form-mail-element. URL directs user to a confirmation page. After confirming the mail address user is redirected to the confirmation of the webform.

Until the mail is confirmed the webform submission is flagged incomplete.

Comments

lucur created an issue. See original summary.

jrockowitz’s picture

Status: Active » Closed (won't fix)

This feature should be handled in a dedicated contrib module because the workflow to track the opt-in is requires a full API.

Someone is already working to solve this problem via the Email confirmer

New features and integration with existing modules such as webform are in mind.

jrockowitz’s picture

Status: Closed (won't fix) » Needs review

We could create a dedicated ticket to scope out and estimate implement Webform Email Confirmer Handler using the Email Confirmer API.

mgifford’s picture

Status: Needs review » Active
Issue tags: +GDPR

I'd like to have a reference to what part of the GDPR this fits within (if at all).

eric heydrich’s picture

@mgifford You have to proof that the user has sent his consent for example for getting in contact with him. You need Double Opt-In because everyone who knows it can use your E-Mail-Address in a form. You can only know if it was the real owner of the E-Mail-Address who gave consent, if he confirms an E-Mail with a confirmation link.

mgifford’s picture

I'm not looking for good logic, but policy. Closest I could find was https://advisera.com/eugdpracademy/gdpr/conditions-for-consent/

I'm not saying it isn't a good idea, but I think that it might also be a myth that it is required according to the GDPR:
https://www.linkedin.com/pulse/double-opt-in-gdpr-myth-hannah-churchman/

mgifford’s picture

Just trying to help classify this in the context of GDPR.

AHansen’s picture

Even if the GDPR is not specific here - laws often aren't and we have yet to see what jurisdiction makes of it - double opt-in seems a secure and also a fair procedure.
The user sign-up, which ships with Drupal core, has double opt-in, right? Wouldn't it be possible to copy that? (Sorry, being a newbie to Drupal, I have no idea about the technical details. But I would love to have the feature.)

berdir’s picture

@jrockowitz: The thing with double-opt-in is that you probably want to trigger (some) handlers only after an e-mail has been confirmed, e.g. sending data to mailchimp or some other service.

For that to work well, I think it needs to be supported in an official way in webform (e.g. a confirmed flag on submissions, setting to require confirmation and then on handlers, being able to only have them triggered on confirmation (through conditions?)

jrockowitz’s picture

@Berdir You are right, the best solution would be to add a dedicated 'confirmed' flag with a 'confirmed' state added to the \Drupal\webform\WebformSubmissionInterface.

Some notes/thoughts...

  • The field/property should be called 'is_confirmed' to be similar to the 'in_draft' field/property
  • The 'is_confirmed' field could be exposed to admins and manually trigger handlers.
  • Might need to add an enable Double Opt-In setting to webforms.
  • Most handlers need to support confirmed state, this includes email, remote-post, settings, etc..

This could turn into a lot of work and I do not have any clients that need this feature.

berdir’s picture

> This could turn into a lot of work and I do not have any clients that need this feature.

Yep and not expecting anything from you here. Sounds like you would be onboard with the general idea of having/supporting that, though. In that case, we might be able to work on it. No promises and definitely no timeline right now, but we'll update this if it comes to that. Unlike you, we do have clients interested in it, question is how much it is worth to them I guess ;)

jrockowitz’s picture

This feature should be handled in a dedicated contrib module.

jrockowitz’s picture

Status: Active » Closed (won't fix)
orlando.thoeny’s picture

I have started to work on a Webform double opt-in module.
It can be found here. Help is appreciated.
https://www.drupal.org/project/webform_double_opt_in

jrockowitz’s picture

Status: Closed (won't fix) » Active

The best I can do is include your module in the list of Webforms Add-Ons to push people to try it out and help.

orlando.thoeny’s picture

Would be nice. It is still in development though. Would wait until it has at least an alpha or beta version.

jrockowitz’s picture

It is worth adding it so that people will help out and test your code.

  • jrockowitz committed b11f7de on 8.x-5.x
    Issue #2951681: Provide email Double Opt-In
    
jrockowitz’s picture

Status: Active » Fixed

@orlando.thoeny Everything in Open Source is still under-development.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jlbellido’s picture

@orlando.thoeny we had the same idea at the same time, in fact we just published https://www.drupal.org/sandbox/jlbellido/3058231 yesterday without being aware about your project. I am glad to see that yours is much more mature.

I'd like to help you there in the issuequeue.

Really nice work!

orlando.thoeny’s picture

@jlbellido
Thanks :)
There's patches for dependencies, and one thing that need to be done. In order to be able to provide an alpha release.
Help is appreciated if you want to help out: https://www.drupal.org/project/webform_double_opt_in/issues/3047474