I have a survey and I want to show participants their responses for review before submitting. These are all multiple selection items. By default, the piped responses come in separated by a comma (selection1, selection2, selection3). I would like to instead put these each on a new line. They are all being brought in to a descriptive text element. I wrapped the descriptive text in a <span> with an id=ReviewWrapper and then added the JS below. Rather than replacing the commas, it is replacing the entire descriptive text with /,/g. I can't for the life of me figure out why. Relatively new to JS and this is one of my first attempts at implementing JS in Qualtrics. Any help is greatly appreciated. > Qualtrics.SurveyEngine.addOnload(function() > { > var pipedText = $('ReviewWrapper'); > console.log(pipedText); > pipedText.replace(new RegExp(",", 'g'), '/n'); > console.log(pipedText); > });
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.