Closed (fixed)
Project:
Webform
Version:
7.x-3.18
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 May 2010 at 19:00 UTC
Updated:
1 Nov 2017 at 05:12 UTC
Jump to comment: Most recent
follow the steps in THEMING.TXT
- Open the Webform module directory.
- Copy (do not move!) the "webform-mail.tpl.php" file to your theme directory.
- Open up the new file and edit it to your liking. The webform-mail.tpl.php file
contains further instructions on how to get started with theming the e-mail.
I did modify the file just to make sure the custom template is used
I cleared cache
and submitted a form
the custom template contents don't appear in the email
what does it seem to be the problem ?
Comments
Comment #1
quicksketchIf following the steps, I can't see what's wrong with your approach here. It should work as you've described.
Comment #2
drupalstaff commentedComment #3
quicksketchClosing after lack of activity.
Comment #4
jorgvloet commentedI have got the same problem, webform doesn't use the template file webform-mail.tpl.php. It doesn't even uses the file stored in the webform module directory (webform/templates/webform-mail.tpl).
in file webform.module on row 2083 I found this code:
so I guess that when the var $email['template'] is "default" than the system is going to use the template file webform-mail.tpl.php or a custom one stored in theme directory.
But how I configure my webform, the var will never be default.
I've tried emptying the custom template field (under webform emails) and set the selectbox to default, nothing, setting the selectbox to custom, nothing happens.
I also saw that when I put some text to the textarea (so create a custom email trough the config of webform) than that text is put in the var $email['template'] but still no default.
this could be solved by putting "default" in the textarea, or directly in the database like I have read in http://drupal.org/node/961716 fixe by adeb, but I don't think that that’s the way to do this.
Comment #5
quicksketchHi jorgvloet. The 3.4 version has a bug in it that will cause the drop-down select list above e-mail templates to say "Default" even when it's not the default. Edit your e-mail configuration, change it to "Custom" then change it again back to "Default" (you should be asked a confirmation message to approve switching back to the default). Don't change the contents of the textarea at all.
This problem has been fixed already in CVS, I'll be putting out a 3.5 version that properly sets the template select list to "Default" when the default is actually being used.
Comment #6
jorgvloet commentedHi quicksketch, thanks for your reply, I will be waiting for the release of 3.5
Comment #7
quicksketchNote that a security release was pushed out last night that does NOT include the fix. It'll be in the 3.6 version now.
Comment #9
vood002 commentedI was unable to get the webform-email form to save with "Default" selected, it would always revert back to Custom.
Don't believe I was doing anything wrong.
I had to manually change the field in the database, then it worked for me.
Leaving closed in case I'm an idiot. Posting in case I'm not.
Comment #10
pale177 commentedI had the same issue
Try copying the file in other Theme directories.
I was using the Garland theme for the website but the form was using the Seven theme. Took an hour to figure that out!
Comment #11
oriol_e9gYeah! Same problem.
Steps to reproduce:
Comment #12
oriol_e9gComment #13
danchadwick commentedThe template FILE is not visible there. That page shows the body of the message which goes into the template.
Comment #14
oriol_e9g@DanChadwick I'm trying to say that in /modules/webform/templates/webform-mail.tpl.php you have the standard file content:
And if you copy&edit this file in: /themes/*your_theme*/templates/webform-mail.tpl.php with this new content:
When you visit node/*/webform/emails/* you expect to see in the textarea named "E-mail template":
But you encountered:
And when you submit a submission you are receiving the content defined in /modules/webform/templates/webform-mail.tpl.php not the version defined in your template: /themes/your_theme/templates/webform-mail.tpl.php
So, webform is ignorin the template defined in your theme... and, in my case, this problem is related in Webform 4.8.
Comment #15
danchadwick commentedThe UI is a little confusing. By changing the theme template file, you are changing what the UI calls the Default template. I'm guessing that you have "Custom template" chosen, in which case Webform uses whatever is in the textarea.
If you are still confused, open a new issue, rather than continuing this in an old, unrelated closed issue.
Comment #16
alex.skrypnykThe lookup for the template is performed in current theme, but current theme would most likely be some admin theme, which is not the theme that you are probably trying to put your template override file.