Updating default choices | XM Community
Skip to main content
Solved

Updating default choices

  • January 31, 2020
  • 4 replies
  • 77 views

Forum|alt.badge.img+2
This seems a basic request but I can't figure it out. I have some questions (matrix table if it matters) with default choices, pulled from my contact list. This works. I want my respondents to be able to change these answers. But I want the answers to be pulled through to later questions. I have done this using default choices (piping from survey questions), and this works initially, but if I go back and change the answers to the first question, the new values are not pulled through to the later questions. A support person tells me that this is intended functionality. Does anyone have any pointers to how I might get around this. JS? TIA. Stephen

Best answer by StephenR

For the record, somebody helped me find a solution to this using localStorage in Javascript.

4 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • February 2, 2020
Post the JavaScript that is setting the default choices. What is probably happening is that when the respondent goes back the JS is re-populating the default choices. The solution it to check if the question has already been answered before populating the default choices.

Forum|alt.badge.img+2
  • Author
  • February 3, 2020
@TomG - thanks for looking. I may not have explained well. I have not used JS to set the choices. So the first question has `${e://Field/Q8_IND_C6ii_A_q1}` (which is pulled from a contact list via an embedded data field). Some of these questions will have been answered previously (as it is a repeat survey) so I'm not sure if a check as you suggest would work. The answer above is pulled through to later questions using `${q://QID30/ChoiceTextEntryValue/1/1}` (I do have some JS but that is just working out some ratios and making boxes read only and as far as I can see does not affect this issue.)

Forum|alt.badge.img+2
  • Author
  • Answer
  • February 3, 2020
For the record, somebody helped me find a solution to this using localStorage in Javascript.

  • July 1, 2021

Can you share the solution?