Webform integration

Created on 23 March 2019, over 5 years ago
Updated 14 November 2024, 9 days ago

It would be nice if you could use Easy Email templates for sending webform emails. That way you use all the formatting and template features for sending an autoresponse to a webform submission.

This would be nice for creating whitepaper signup forms. You could create something like the Webform Protected Downloads module using only Webform and Easy Email. Attach webform to a node, which has a file field on it. Use tokens to add that file as an attachment on the Easy Email side.

Webform currently has several options for formatting emails that get sent on submission. I assume there is probably a way to hook into that and make an Easy Email template an option to pick.

πŸ“Œ Task
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States zengenuity

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States zengenuity
  • πŸ‡ΊπŸ‡ΈUnited States zengenuity

    I have this functionality mostly working the MR. However, in practice, this core issue makes it hard to use: https://www.drupal.org/project/drupal/issues/3031637 ✨ Entity reference: allow specifiying that every bundle is allowed Needs work

    I think when you build a template for a webform notification, you would normally want to have an entity reference field that holds a reference to the submission the email is about. That's how you get the tokens in the email template.

    You can do this, and it works, but core requires that every entity reference field specify allowed bundles, which means that you have to specify the exact webforms in the field configuration. You can't just specify any webform submission. This doesn't prevent you from using an override for the webform, but it creates an unintuitive issue where you have to update the field configuration any time you add a new webform to the site, or you have to create a new webform submission entity reference field for each template. Each of these is somewhat annoying.

    I'm still going to finish this up and release it, but I wanted to acknowledge the issue here, since it's likely to come up once this feature is available.

  • πŸ‡ΊπŸ‡ΈUnited States zengenuity

    I'm going to postpone this issue for now to see what develops with the core issue ✨ Entity reference: allow specifiying that every bundle is allowed Needs work .

    In the meantime, Webform emails can be sent via Easy Email with the changes made in ✨ Create a way to generically override an email without parameter mapping Active .

    From that issue, there is a new option in the Easy Email Overrides module that allows you to provide a (probably blank) template and have it copy over the content from the originally sent email to it on sending. In addition, overrides can now match sent emails by module or match all sent emails from the website. So, you can configure an override to wrap all emails from Webform in an Easy Email template before sending. This should address most of the use cases people have related to integrating Webform and Easy Email.

Production build 0.71.5 2024