close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Word Wrap For Email Template

Thread began 2/13/2011 6:35 pm by Paul45 | Last modified 2/15/2011 12:14 pm by Jason Byrnes | 4510 views | 7 replies |

Paul45

Word Wrap For Email Template

Hi i have used the block email template. I have tested the form i have created and entered a paragraph of text in the comments field and submitted the form.

However when i checked the email that was sent the text is running out of the table and of the email template. Is it possible to apply a word wrap to the email template table to prevent this from happening?

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the email template file so i can see how you have it set up.

Sign in to reply to this post

Paul45

Thanks for taking a look at this Jason.

Basically i have used the block email template and have modified the text only, however the table field shinks and expands depending on the amount of text that will be entered in the comments field on my contact page.

Im hoping there is a way of fixing the table so that the text doesnt push out of the template boundary, but expands with the template down the page instead. Possibly some sort of text wrap?

Hope this makes sense

Cheers

Attached Files
Block_2.zip
Sign in to reply to this post

Jason ByrnesWebAssist

try changing this line:

php:
<td style="font-family: 'Times New Roman', Times, serif; font-size: 12px;padding: 3px; border-left: 1px solid #DDD; color: #B6B6B6;"><?php echo(str_replace("\n","<BR />",(is_array($pval)?implode(", ",$pval):$pval))); ?></td>



to:

php:
<td style="font-family: 'Times New Roman', Times, serif; font-size: 12px;padding: 3px; border-left: 1px solid #DDD; color: #B6B6B6;"><?php echo(str_replace("\n","<BR />",(is_array($pval)?implode(", ",nl2br($pval)):nl2br($pval)))); ?></td>
Sign in to reply to this post

Paul45

I replaced the line Jason but unfortunately the text is still running off the template if a long string of text is inserted into the table. The wrap seems to work for the first line, but when it returns to the second line the table continues to expand.

Sign in to reply to this post

Jason ByrnesWebAssist

try adding a width to the td cells style:

php:
<td style="width:400px; word-wrap: break-word; font-family: 'Times New Roman', Times, serif; font-size: 12px;padding: 3px; border-left: 1px solid #DDD; color: #B6B6B6;"><?php echo(str_replace("\n","<BR />",(is_array($pval)?implode(", ",nl2br($pval)):nl2br($pval)))); ?></td>
Sign in to reply to this post

Paul45

Unfortunately still no joy after inserting the 400px width and word-wrap: break-word;

I have replaced the lines of code and the same thing is happening, i have input a string of text in the table just so you can see the problem more clearly. I have zipped up the template.

Thanks

Attached Files
templates_2.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the example string is causing the issue.

You're sample string is an unbroken string with no spaces, the lack of spaces in the the string is causing the table cell to expand.


using a more realistic string of words separated by spaces, you should not encounter this issue.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...