Essay Text Paragraph Question-Formatting from Survey to Email | XM Community
Solved

Essay Text Paragraph Question-Formatting from Survey to Email

  • 21 February 2020
  • 4 replies
  • 34 views

Userlevel 3
Badge +11
Hello,

I am using Qualtrics as an approval system. Whenever one of our staff writes out instructions to a student in a essay text paragraph question it is formatted the way they want it, however, when an email action is sent with the results of that question it does not keep the same formatting. For short messages it isn't a big deal but sometimes there are a lot of instructions and the formatting looks terrible. I have included a couple of screenshots below.

Essay Text Question in System:
!

Result in an Outlook Email:
!

Thanks in advance for your help.
icon

Best answer by Martin_O 24 February 2020, 18:32

View original

4 replies

Userlevel 7
Badge +27
You need to use JavaScript to replace the line feeds (`\\n`) with html breaks (`<br>`)
Userlevel 3
Badge +11
Thanks @TomG . Do I just have to add some type of code in the javascript within my survey question or do I need to do anything outside of the question as well? The text result in the survey is sent to the email through an embedded data field not just piped text if that makes a difference.
Userlevel 7
Badge +27
> @Martin_O said:
> Thanks @TomG . Do I just have to add some type of code in the javascript within my survey question or do I need to do anything outside of the question as well? The text result in the survey is sent to the email through an embedded data field not just piped text if that makes a difference.

You can save it to an embedded data field in the addOnPageSubmit function. See this post:
https://www.qualtrics.com/community/discussion/comment/17438#Comment_17438
Userlevel 3
Badge +11
@TomG That worked amazing. Thank you so much!

Leave a Reply