Default email template that shows up for each form is as below
print ($email['html'] ? '<p>' : '') . t('Submitted on [submission:date:long]'). ($email['html'] ? '</p>' : '');
if ($user->uid):
print ($email['html'] ? '<p>' : '') . t('Submitted by user: [submission:user]') . ($email['html'] ? '</p>' : '');
else:
print ($email['html'] ? '<p>' : '') . t('Submitted by anonymous user: [submission:ip-address]') . ($email['html'] ? '</p>' : '');
endif;
print ($email['html'] ? '<p>' : '') . t('Submitted values are') . ':' . ($email['html'] ? '</p>' : '');
[submission:values]
print ($email['html'] ? '<p>' : '') . t('The results of this submission may be viewed at:') . ($email['html'] ? '</p>' : '')
print ($email['html'] ? '<p>' : ''); [submission:url] print ($email['html'] ? '</p>' : '');
I would like to customize the above default email template for each forms in Drupal.
I have a Drupal project structure as attached in the file.
I went through various online issue raised in drupal community to customize default email template.
I copied webform-mail.tpl.php from webform directory and placed it in default theme directory in my case
advisor-drupal-webform/src/themes/webform-mail.tpl.php(customized).
However the customized template is not getting reflected in email text area.
I have attached my project structure. could you help me where should this file be exactly placed so that the customized email templates gets displayed in text area.
Since I am new to drupal you can start specifying the changes from basics.
I would also like to provide additional information on this. When I build this project in bamboo the zip file gets created which has many files(probably they are coming from the module installed in Drupal) which are not present in my code structure.
I have actually copied webform-mail.tpl.php from \sites\all\modules\contrib\webform\templates\webform-mail.tpl.php and placed it in my theme directory as given in the attached image.
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| AdvisorDrupal-structure.PNG | 24.88 KB | bibek_principal |
Comments
Comment #2
idebr commentedComment #3
liam morlandThis may answer your question:
https://drupal.stackexchange.com/questions/89106/override-modules-templa...
Comment #4
liam morlandIf you need further help, please re-open and provide details.