Updating default choices | XM Community
Skip to main content
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
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.
@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.)
For the record, somebody helped me find a solution to this using localStorage in Javascript.

Can you share the solution?


Leave a Reply