- 🇳🇿New Zealand glennnz
I'm struggling with this too; trying to override the default 'webform submitted' email with a twig template. I've selected Twig as the email format and have added just, "This is broken..." to that field.
If my webform name is 'custom_webform' and I've added an email handler to that webform called 'custom_handler', exactly what should my twig file be called?
And, do I need to define this in a hook_theme()? I don't think so.
I'm getting lots of emails telling me that it's broken....
Thanks,
Glenn
- 🇳🇿New Zealand glennnz
@jrockowitz
Re your comment #7, how could I make those submission data items available for use in a node that wanted to display some webform data?
Thanks.
- 🇳🇿New Zealand glennnz
Solved for me.
Selected Twig template as the email handler body format, and named my twig file as webform-email-message-html--WEBFORM-ID.html.twig.
- Status changed to Active
over 1 year ago 4:25am 16 July 2023 - 🇳🇿New Zealand glennnz
@jrockowitz
I have the twig template working but can't get the webform submission data to show in the email.
I've used your code from comment #7, but can't get the data to display in the email; {{ data }} or {{data.field_name }} both show as empty in the rendered email.
Thanks.
- Status changed to Closed: works as designed
over 1 year ago 11:13am 16 July 2023