Paragraph Formatting | XM Community
Solved

Paragraph Formatting


I'm using a "Text Entry", "essay" style question to allow users to provide their justification for their proposal. My intent is to allow them to write as many sentences as they feel are necessary - like an essay.

However, when i use the piped text function to pass the info to the next survey the formatting does not remain in effect. It all becomes just one long string, no paragraph breaks or bullet points.

suggestions?

Thanks
icon

Best answer by TomG 13 June 2018, 17:27

View original

15 replies

Userlevel 7
Badge +27
I think the only way that would work would be if you used an Authenticator that reloaded progress and both people used the same id.
Thanks again Tom - I'm not too tech savvy so I've got another idea. Instead of passing the the piped text to a different survey would it be possible to simply have the approvers simply use the same survey over again? basically as they clicked "Vp Approval" this would then trigger a new email and open a new question for the "SVP approval"...think this might be possible?
Userlevel 7
Badge +27
The encode method you used encoded spaces as +. It depends on the encoding function you use. If you are using JavaScript I think you want to encode each value with encodeURIComponent. If using php through a web service use rawurlencode.
when I urlencode it, i usually get a bunch of "++++" and such? so eithe ri did the wrong kind of encoding or it cause more issues.

I appreciate your help -- is there an alternative way to pass the piped text w/o going thru the email URL? ...or do i need to "encode" the email url somehow to make this work?
Userlevel 7
Badge +27
Ahh, that explains a lot. If you are passing as a url parameter you'll have to urlencode it. You should be doing that for all the text entry values anyway, otherwise, people could enter something that will blow up your url query string. You can do the encoding through JavaScript or a web service.
Hi - no, I mean "email trigger"....in the body of the email trigger i have the following --
ex.co1.qualtrics.com/jfe/form/SV_8BAnZfRrw0yk0jb?EmployeeDetails=${q://QID72/ChoiceTextEntryValue/1} %20${q://QID72/ChoiceTextEntryValue/2}&NewTitle=${q://QID70/ChoiceTextEntryValue}&Justification =${q://QID67/ChoiceTextEntryValue}&CurrentSalary=${q://QID68/ChoiceTextEntryValue/1}&NewSalary=${q://QID68/ChoiceTextEntryValue/2}&EquityRequest=${q://QI D37/ChoiceGroup/SelectedChoices}&PercentIncrease=${e://Field/PercentIncrease}&NewBonus=${q://QID54/ChoiceGroup/AllChoicesTextEntry}&CxOEmail=${q://QID75/ChoiceTextEntryValue/2}&Test=${q://QID80/ChoiceTextEntryValue}

I then take all this, and and turn it into a shorter hyperlink such as "review & approve"....but this is how i'm getting the "embedded data" from survey to survey. also making sure that in the survey flow i'm adding each as embedded data.

in the 2nd survey i've tried piping it into question text or into text entry multi line, or essay input field...but no matter which I choose the formatting (bullet point, paragraph, line break...)is always lost
Userlevel 7
Badge +27
I'm still not clear on how you are passing the variable "Justification". Did you mean contact trigger instead of email trigger so it gets stored as a field in your panel? Also, in the follow-up survey are you piping into Question Text or another essay text input field?

A different, more complex approach would be to convert the text string to html using JavaScript. You could replace new lines (either \\n or \\r) with `<br>` tags.
I have tried what I believe are all possible solutions, unfortunately it isnt working.

Any ideas are welcome 🙂 i'm willing to test

Thanks
i tried bringing it into a text entry question and looked at html view and it still didnt work

is this something that i need to set in the very beginning (original survey) as opposed to the second survey?
Hi - I create an embedded data field in the survey flow ("Justification"), then in my email trigger, i create the embedded field by doing Justification = $ { q://QID67/ChoiceTextEntryValue}

then in my new survey i add the embedded data field to survey flow and in a new text entry question i enter the embedded data fields -- does that make sense?
Userlevel 7
Badge +27
Assuming you are piping into question text, you add html tags in HTML View. In HTML View it should look like:
```
Justification -
<pre>
${e://Field/Justification}
</pre>
```
`<pre>` works when I pipe the question answer in the same survey. You didn't tell us how you are getting the answer from one survey to another...it might have an impact on whether it works or not.
how exactly do I add the <pre> tag?

I did it just as text so it looked like this <pre>${e://Field/Justification}</pre> and I ended up with the piped text and the tags as text

I then went into HTML view and added it as

Justification - <pre>${e://Field/Justification}</pre><div> </div>

neither worked
Userlevel 7
Badge +27
Try putting your piped text inside an html `<pre>` tag:
```
<pre>
${e://Field/mytext}
</pre>
```
Hi,

Here is what I'm trying to do. In the original survey the individual would be asked -

What is the justification for this request?
-the person did a great job
-they were instrumental in delivering project x
- they receive high customer satisfaction scores

i want to take this text and pipe it into another survey so that it can be approved or denied, but currently when the text is piped it does NOT keep the bullet formatting; it will all show on one line.

does that help?
Userlevel 7
Badge +6
What are you piping in exactly? Is it their justification or their proposal that they can read when writing their justification?

Leave a Reply