I think I understand now how it is intended to work but I was very confused at first. I was confused as to when the email template is using data from the webform-mail.tpl.php or when it is using custom data from the database. Originally I couldn't figure out how to get webform to use the webform-mail.tpl.php file after setting a custom template on the node/[nid]/webform/emails/[email-number] page. I found out that the form will be set to "Default template" even if webform is really using a "Custom template" from the database. In order for me to change this I had to click on "Custom template" and then click back on "Default template". At this point the webform-mail.tpl.php will be used again. At least it was for me.
Overall, I felt it was a little unclear as to what webform was actually doing in the webform-mail template override section. Perhaps the text area could be grayed out when the webform-mail.tpl.php file is being used so it is clear that the data in the text area will not be used. Also, I think the option should start on Custom template if it is indeed using a Custom template from the database.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | webform_template_default.patch | 716 bytes | quicksketch |
Comments
Comment #1
quicksketchI think this is the "bug" in this report. If you've overridden the template in your theme, then that becomes the "default" template, even though it's been customized by your theme. Certainly not having the correct default value for "Default" or "Custom" template makes this whole situation much more confusing.
Let's start with just fixing the bug, I'll consider disabling the textarea later, through I'm not very much a fan of making users try to figure out how to enable the textarea.
Comment #2
quicksketchCommitted attached patch.
Comment #3
quicksketchClarifying title.
Comment #4
daveparrish commentedYep, that fixes my issue. Thanks quicksketch!
Comment #6
Michsk commentedFixes it for me also. But it doesnt seem committed tough set to closed/fixed.
I'm still having problems with theming the email but thats another issue.This one is fixed but not committed.
Comment #7
smilterman commentedHey everyone,
I'm stuck (again) with another problem in drupal.
My problem with customising e-mails in webform is the following.
My e-mail template is always stuck on custom, so it takes the input from the box below. when I change it to default, it demands if I want to revert any changes etc. but when I save the e-mail settings and go back in, it is still stuck on custom. I think this is why I can't seem to use the webform-mail.tpl.php page.
Any thoughts or ideas?
Thnx in advance.
Comment #8
combert commentedI had the same thing happen to me. Turns out you have to disable ckeditor (just click the "Switch to plain text editor" link under the textarea), and then set the dropdown to default. A popup will ask you to confirm this (if not, set it to custom and then default). It should then repopulate the textarea with the default text, but it will use your template.
Comment #9
smilterman commentedThat did the trick, thanks heeps.
I thought it might have someting to do with ckeditor but didn't fiddle around enough apparently :)
Thnx again.
Comment #10
brankoc commented@Combert, I have also encountered this problem, and have reported it separately: http://drupal.org/node/1087926 .
Comment #11
bibek_principal commentedI am using drupal 7.63 and facing the same issue