Overcome line break when getting piped text from contact list | XM Community
Skip to main content

I was trying to save long stories include line breaks (limit to 2000 characters) from a previous survey and show them to later ones using the contact list.
The saving action is good. I checked the contact list manually and it does save the whole 2000 characters including line breaks.
But when I set the embedded data and put it to questions using piped text, the result shows only the first line, and space is also limited to a single line.

Is there any way to solve it?

I tried to add this javascript to the object question and seems not to work. The piped text is ${e://Field/EFI_5}
Qualtrics.SurveyEngine.addOnload(function()
{
  var pipedText = jQuery("#"+this.questionId+" .InputText").val().trim().replace(/\\n/g, "
");
  Qualtrics.SurveyEngine.setEmbeddedData("EFI_5", pipedText);
});

Be the first to reply!

Leave a Reply