It seems that unless a value - and it parent - is specified in 'Include E-Mail Values" in the Webform Emails settings at node/%/webform/emails/%, then even if the token is specified directly in the Email Template, it is not included. This seems to conflict with the descriptive text in the Included E-mail Values fieldset, which says
The selected components will be included in the [submission:values] token. Individual values may still be printed if explicitly specified as a [submission:values:?] in the template.
My work around once I twigged why many emails were arriving with blanks is to go through my webforms and check the INCLUDE ALL COMPONENTS. I suspect that the current outcome is not intended. I hope the screenshots help clarify.
The set up is that i have 4 fields (one, two , three, four) and one fieldset (five). Three and four are children of fieldset five. Unless five and its children are selected, three and four will not be printed when explicitly specified as documented.
In my first test, in email settings, I check one, two and three, but not four or five: expected config, email template. Result is that the email contains only values for one and two, but not three: email result (unexpected).
In the second test I check one, two, three and five workaround config - and I then do get the value for three - intended result in email
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | webform_excluded_tokens-2182345.patch | 1.74 KB | quicksketch |
| #2 | Screen Shot 2014-01-27 at 4.33.34 pm.png | 30.19 KB | xurizaemon |
| Screen shot 2014-01-27 at 12.11.40 PM.png | 30.95 KB | petednz | |
| Screen shot 2014-01-27 at 12.11.52 PM.png | 11.09 KB | petednz | |
| Screen shot 2014-01-27 at 12.07.07 PM.png | 18.18 KB | petednz |
Comments
Comment #1
petednz commentedComment #2
xurizaemonRewrote description to better document how to reproduce the issue.
Comment #3
quicksketchThanks guys for the extremely descriptive bug report. The documentation is indeed the expected behavior, so if the e-mails are not including these tokens we need to adjust the behavior.
Comment #4
quicksketchI've committed this patch which builds the submission renderable separately for the "full" version and the one with the components utilized individually. We just released beta2 today, so unfortunately this won't be included until the next release (beta3 or RC1).
Comment #6
fenstratNeeds porting to 8.x-4.x.
Comment #7
fenstratCommitted and pushed e4ea9a3 to 8.x-4.x. Thanks!