Dear Community,
I am looking for a solution to edit the way piped text is displayed in a question. I faced the issue before but always found a way to avoid it. Right now I am looking at the following:
We have four matrix questions with several items where respondents select on a scale / single select whether they like the items. If they like an item the selection would equal 1. In a follow up question we would like to show a list of all items they liked before. Below you see how I would do that with piped text (one of the questions is side-to-side with two columns).
${q://QID1%231/ChoiceGroup/SelectedChoicesForAnswer/1}
${q://QID1%232/ChoiceGroup/SelectedChoicesForAnswer/1}
${q://QID2/ChoiceGroup/SelectedChoicesForAnswer/1}
${q://QID3/ChoiceGroup/SelectedChoicesForAnswer/1}
${q://QID4/ChoiceGroup/SelectedChoicesForAnswer/1}
What we would like to get to is an actual list, meaning each selected item below each other potentially with bullets.
What we have right now is all items per question stringed together, separated by commas. If nothing is liked e.g. in Q2, than there is an empty row which looks weird. Also, when the same item is liked twice in the side-to-side they are displayed twice.
What I am seeking for: Any advice on what is feasible in terms of piped text editing? And how can it be done?
Thanks in advance!
Page 1 / 1
You could manipulate and display them with JavaScript. A general approach:
- Pipe them all into a single comma separated string either directly into the JS or in a hidden in the question text.
- Convert the string to an array
- Remove duplicates and blanks from the array
- Append each array item as an item (
- ) in an unordered list (
- )
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.