Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

E-Mail Template - Text fields displayed in one line instead of multiple lines

  • doesthiswork
  • doesthiswork's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 3 months ago #232569 by doesthiswork
Please help us help you and fill where relevant:
Your LimeSurvey version: 3.27.19+210928
Own server
==================
Hi,
when trying to send out the answers of a survey via e-mail, I am encourtering this issue that when I have a large text field, new lines aren't displayed. Instead Lime Survey puts everything in that text field into one line. 
This is my question input.
 
Those are my values in my template
 
And this is how it looks when I receive an e-mail.


Any idea on how to write out the text the same way as it was entered?

Best regards

Please Log in to join the conversation.

More
2 years 3 months ago #232587 by jelo

Any idea on how to write out the text the same way as it was entered?
 
What email-client is used? It's not uncommon that clients remove CR. E.g Outlook does that in plain text mails.
It looks like HTML, so the issue might be a different one.
 

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 3 months ago #232591 by Joffm
Long free text is a textarea and stored in the database as "text".
This is fine.
 

But in the LimeSurvey answer table we see
 

and if we only display the input via an equation
 
the CR/LF are removed.

So I think it's an error in ExpressionScript

You may file a bug report.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • doesthiswork
  • doesthiswork's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 3 months ago #232612 by doesthiswork
I am using Thunderbird 91.13.1

This is the html content of the mail.
Code:
<p><strong>Test 1
Test 2
Test 3</strong></p>
 
<p> </p>
 
<p><strong>Test 1
Test 2
Test 3</strong></p>
 
<p> </p>
 
<p><strong>Test 1
Test 2
Test 3</strong></p>
 
<p> </p>
 
<p><strong>Test 1
Test 2
Test 3</strong></p>
 
<p> </p>
 
<p><strong>Test 1
Test 2
Test 3</strong></p>

Please Log in to join the conversation.

  • doesthiswork
  • doesthiswork's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 3 months ago #232629 by doesthiswork
I opened up a bug report: bugs.limesurvey.org/view.php?id=18405

Thank you for your help

Please Log in to join the conversation.

  • doesthiswork
  • doesthiswork's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 3 months ago #232634 by doesthiswork
I found a solution to my problem. www.w3schools.com/cssref/pr_text_white-space.asp
I added following css style around my textfield.
Code:
<span style="white-space: pre;">{question.value} </span>
The value of the textfield is now properly displayed in the e-mail

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 3 months ago - 2 years 3 months ago #232658 by holch
Why not a simple </br>?

Sorry, I only fully understood the question after a second read. You are not talking about piping results from different questions into your email, but of one question with text in various lines. Ignore my comment. ;-)

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
Last edit: 2 years 3 months ago by holch.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose