I have an embedded data field I built with up to 20 items, separated by commas, and their estimated cost.
PSItemList = Item 1 $10 , Item 2 $20 , Item 3 $15
I would like to reformat PSItemList to show the items one per line in a vertical format instead. I tried various pieces of code from other posts, with no luck in getting any to work. I can either re-display the PSItemList embedded data field, or in my example, was trying to create a new field called PSReformList. All suggestions appreciated!
Qualtrics.SurveyEngine.addOnload(function()
{
var pipedText = "${e://Field/PSItemList}";
pipedList = pipedText.replace(/,/g, '\\n');
Qualtrics.SurveyEngine.setEmbeddedData("PSReformList",pipedList);
});
Question
Help with replacing comma with newline in an embedded data field
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
