Solved
preserving multi-line formatting of piped text in triggered emails
I am using Qualtrics to create online forms. I my forms, I have some "Essay Text Box" entries (or "Multi line").
I am using email triggers to deliver form replies via email and include those "Essay Text Box" entries into email body as piped text ${q://QID16/ChoiceTextEntryValue}.
Unfortunately, the new lines formatting from the original text is not preserved.
For example, if "Essay Text Box" entry was typed with multiple lines as:
_I want
this text
to be readable_
then, in emailed message it becomes just one line:
_I want this text to be readable_
Is there a way to preserve the original lines (new line) formatting?
I also insert piped text into "From Name:" and "Reply-To Email:" of emal triggers, which works well. Such feature seems to be not available in email Tasks. For that reason, I am not able to use Tasks instead of email triggers.
Thanks
Best answer by TomG
> @Alex_WLU said:
> In your example, naming notion "QID16pipedText" is just for for the sake of explanation or it should match the question number or something?
You can name it whatever you want. I used QID16 because that's the question you referred to in your original question.
> In your code, I changed your "QID16pipedText" to "QID64pipedText" and inserted the code into Q31, 3 tmes:
> /*Place your JavaScript here to run when the page loads*/
> /*Place your JavaScript here to run when the page is fully displayed*/
> /*Place your JavaScript here to run when the page is unloaded*/
>
> Then, in my email trigger, I tried to put
> ${q://QID64pipedText/ChoiceTextEntryValue}
> ${q://QID64pipedText/pipedText}
> ${QID64pipedText}
> ${q://QID64/ChoiceTextEntryValue}
> $pipedText}
> ${q://QID64/pipedText}
> ${QID64pipedText/pipedText}
You only need the code once. Replace everything on JavaScript page with the code I provided. Let's say the embedded variable is myVar. Then you would pipe it into your email trigger as:
```
${e://Field/myVar}
```
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

This is how I added it to the message section of the email trigger:
!
Are you able to see what I did wrong? What should it be?
Thx.
