Hello,
I’m trying to get piped answers from previous single select questions to show up as follows:
“PipedAnswer1, PipedAnswer2, PipedAnswer3,...”
Currently how it is set up, this is how it looks like:
“PipedAnswer1 PipedAnswer2, PipedAnswer3...”
I need to be able to have the commas show up consistently, but only if a piped answer was selected. I currently have it set up as an array in JS like this below:
And in the HTML of the question text, I have this entered: <div id=”pipe”>QIDs</div>
If I was to select PipedAnswer1, PipedAnswer3, and PipedAnswer5, it would look like this:
PipedAnswer, , PipedAnswer3, , PipedAnswer5, , ,
How do I get rid of the unneeded commas if the answers aren’t selected above? Do I need some kind of loop? Thanks in advance!