Pre-Select Code | XM Community
Skip to main content

Hello, I am relatively inexperienced with Javascript, but I am creating a survey where I have 8 options (select all that apply). I want all of those options to be carried forward to a later question in the survey with answer choices that were previously selected to be pre-selected. 

 

How can I do this using Javascript, and how do I embed the data from the initial question?

Hello @peytoncrest,

Why don't you try the ‘Carry Forward Choices’ option instead of JavaScript. Refer the link for more information: Link.

Let me know if this helps.


I have tried that, but I want the choices to also be pre-selected as options for the subsequent question rather than being left blank. What I ideally would like to do is code the selected answer choices into embedded data then use that to have it pre-selected by the time the participant approaches the second question later on in the survey. My goal is the following:

 

1. Select all that you use for X:

  1. A
  2. B
  3. C
  4. D
  5. E
  6. F
  1. (later on in the survey on a separate block) You selected the following for X (the selected choices from question 1 are pre-selected), please adjust for what you use for Y.
  1. A
  2. B
  3. C
  4. D
  5. E
  6. F

for example, let’s say a participant selects A and C for question 1. I want A and C to be pre-selected for question 2, but they can unselect it or select more options if it is different when they use Y.


Leave a Reply