Webform email, need help with line breaks
Tank Jr - November 2, 2009 - 22:55
Hi everyone,
I am new to this realm and need help with a website that I am being asked to build. I have a from on that site that accepts submissions and emails a confirmation email to the submitter.
I have almost everything in place, by using Webform, and the email gets sent, but I need to edit the content( delete a few lines and add some that are specific to my submission). I looked up the Internet and did the following:
1.Copied the 'webform-mail.tpl.php' file to my theme directory and renamed it for the node.
2. Then I edited that file.
My problem is that I am printing several lines and would like a newline to show up, but it is not.
I am usin the following syntax:
<?php print t('Here is line 1 \n')?>
<?php print t('Here is line 2 \n')?>However the lines just get printed as one single large line, with no breaks.
Any help will be greatly appreciated.

=-=
add some HTML around the lines if you want them to break or put them in divs and use css.
Re: HTML
Hi
I did try to put in html tags like '
<br>' but that is being printed directly as<b>.And the only syntax that seems to work is
<?php print t ('This is a test ') ?>I used the break like this
<?php print t('See if this works <br>')?>=-=
HTML tags don't go inside the t() string, That is only for text and is why the tag is being printed.
use
<?php print t ('This is a test ') ?><br />
<?php print t('See if this works') ?>
or
<div><?php print t ('This is a test ') ?>
</div>
<div>
<?php print t('See if this works') ?>
</div>
notice that the HTML is not embedded in the t()
Re:
Hi,
thanks for the help. I tried using the first method you mentioned, and now I get the line breaks as I need. The problem is that the tag
<br \>is getting printed as well.
=-=
That is because I pasted the lines you originally used and forgot to remove the
<br>you added in the t(). I've edited my previous comment, removing the extraneous br tagsRe:
Thank you for the help.
Actually I noted that if I insert a blank line into the code it creates a line break.