How do I preserve line breaks in an essay question | XM Community
Skip to main content
Question

How do I preserve line breaks in an essay question

  • December 14, 2020
  • 4 replies
  • 437 views

EdK
Forum|alt.badge.img

Hi,
I've seen some similar questions but nobody seems to have addressed simply capturing what a respondent enters in an Essay text field if the respondent happens to include a line break:
line 1
line 2
line 3
Can anyone provide me with guidance on how to keep that formatted as entered? I don't know Java but I've had some success copying scripts from this forum when it's very simple and clear what do.
Thanks!

4 replies

AHammell
Level 2 ●●
Forum|alt.badge.img+11
  • Level 2 ●●
  • December 15, 2020

Are you talking about preserving line breaks when you export the data?


EdK
Forum|alt.badge.img
  • Author
  • December 15, 2020

I would love to keep them anywhere. They're not in the survey when I feed the answer to that question back to the respondent (on screen or in an email action), they're not in my Data/Analysis view and they're not in Excel when I export.


AHammell
Level 2 ●●
Forum|alt.badge.img+11
  • Level 2 ●●
  • December 18, 2020

In terms of data export, you can preserve the line breaks if you select "More Options" and uncheck "Remove line breaks" upon export.
Screen Shot 2020-12-18 at 1.40.23 PM.pngThe piped text is a bit tricker...let me get back to you on that one.


EdK
Forum|alt.badge.img
  • Author
  • December 18, 2020

Wow! This is fantastic, thank you! I was really concerned that those breaks were already lost because they don't display in the piped text. Besides solving part of the problem, this suggests that the other part should be solvable somehow. I really appreciate your effort! I can't write Javascript myself but if the solution is there, I can copy/paste!