0

I need to have a bunch of different webform e-mail templates with different text - how do I create those with code in Drupal 7?

2 Answers 2

1

Ok, I got this sorted out, I used hook_form_alter to get the stuff into the select field, and did an override on the javascript-file from the webform module. I will try to answer it more complety in the next days if I have the time to do so.

1
  • Any info you can give on this would be great; we're trying to do the exact same thing.
    – Mike
    Commented Feb 22, 2017 at 19:11
0

Webform emails are themeable using .tpl.php files just as nodes, views etc. There is a THEMING.txt document that ships with Webform that explains exactly how to do what you are after, although the bit you're looking for is near the top:

If you want to edit the e-mail sent by only one particular webform, rename the file "webform-mail-[node id here].tpl.php", replacing [node id here] with the node ID of the webform.

There's also this handbook page on Drupal.org: Customising the emails sent by webform

3
  • No, that is not my need - I want to have my own e-mail templates - like the default and custom one - not a tpl file, with predefined text.
    – MiSc
    Commented Aug 14, 2013 at 9:00
  • Ah, so you want to add your own options to that list? E.g. Default, Custom, MiSc 1, MiSc 2?
    – Chapabu
    Commented Aug 14, 2013 at 9:04
  • Yes, that is what I would like to have.
    – MiSc
    Commented Aug 14, 2013 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.