Can someone please point me in the right direction.
Is there any way to output the plain text sent in the email to something like the output sent to the screen when completing the form.
Please, not just the code needed, but where to put the code. e.g. put this code in this file in this folder.
Many thanks.
Also, great module.
Comments
Comment #1
quicksketchCould you clarify? You want to change the output of the e-mail or you want to show the e-mail output when completing the form?
Comment #2
taxicab221 commentedI would like to change the output of the email that I receive.
I have copied the file webform-mail-tpl.php to the current theme folder as instructed by the file info : -
* Customize the e-mails sent by Webform after successful submission.
*
* This file may be renamed "webform-mail-[nid].tpl.php" to target a
* specific webform e-mail on your site. Or you can leave it
* "webform-mail.tpl.php" to affect all webform e-mails on your site.
*
No change to the email output!
Have read on another post about including a function to change the email headers, but being a newbee, did not know where (which file), to put this function.
I hope this clarifys what I am trying to achieve.
I know this might sound like hand holding, but if we (newbees) are to try to understand how things work, i/we need to be pointed in the right direction.
Fantastic module by the way quicksketch.
Update
Thanks for the quick response
Comment #3
hedley commentedI've been trying to edit webform-mail.tpl.php to make the output more easily readable and I'm getting nowhere either!
What I've been trying to do (I thought) seemed fairly simple, just break up the fieldsets in the email by adding a space or divider or some kind, but I just can't seem to find the right syntax to print each fieldset array.
Anyway It would be great if either the default webform-mail.tpl.php had a nicer looking output, or if there was a additional form component for email formatting which was hidden by default in the form display maybe?
Comment #4
guislutavo commentedI hope this could be useful, or if not, correct me if I'm wrong. In the webform-mail.tpl.php I have replaced the second php code between brackets whith this (sorry, is in spanish, but you will understand the code):
So, the email show the following:
This change all the e-mails. I still have some problems with the tabulations. The endline never works so I put an extra line between any sentence and it fixes. There is another 2 forms of print the text:
For the fieldsets and the hidden components you must call the function as:
Comment #5
taxicab221 commentedUPDATE
I first copied the file 'webform-mail.tpl.php into my theme folder and renamed it to webform-mail-[nid].tpl.php.
I then started to edit this form, using the first 6 php statements as below
From here, i started to build a table to format all the relevant data I wanted to be submitted as below
It took a few tests to find all the
<?php print t($form_values['submitted']['??]) ?>submitted values I needed, but in the end I now have an email that is formatted into a friendly, readable, printable wayI hope this helps.
Comment #6
guislutavo commentedOh thanks a lot, I was trying to do this but never works... I'll try again.
Comment #7
4kant commentedHi taxicab221,
did you get an HTML-e-mail when sending the submissions?
I get only the source-code (or plain text).
If you do so: How did you make it?
Thanks
4kant
Comment #8
Friso D commentedThanks guislutavo and taxicab221 for your help,
I had been looking around for some time for the right PHP code to make certain form values appear in my confirmation email, but to no avail. Thanks for helping me out.
taxicab221, I have the same issue 4kant has; when I put the PHP variables into HTML i receive an unformatted HTML mail in return.
Is there some code I should put in front to push the mail editor to create the rich text? Is it a setting in webform?
I tried looking on PHP.net but couldn't find anything.
Thanks for the great help you are all providing, hope to find a way out on this.
Friso D
Comment #9
taxicab221 commentedSorry for not getting back to you all sooner, been away.
Check out this link
http://drupal.org/node/270472
I seem to remember I had to insert the code into the template file.
Dave
Comment #10
Friso D commentedHello Dave,
thanks for the hint. I inserted the code into the template file and it works just fine.
Ciao,
Friso
Comment #11
quicksketchComment #12
ShannonK commentedI'm sorry I'm such a novice - I don't understand the above instructions. I love this module (Webform) and we are currently using it successfully. I have conditional email recipients up and working as well...what a fantastic feature! But I've been asked to make the emailed results of the form look a little better. What would be great is if I could have the form results in a different font color than the form questions. I followed the instructions and copied the webform-mail.tpl.php file to my themes directory, but I don't know what to do from there. Once I edit it, do I leave it there? Is it even possible for me to change the font color of the user input (form results) in the email?
Thanks in advance - and great module!