Update default choice text after back button | XM Community
Skip to main content

I've added default text to a text entry field that is based on a single select field on the previous page S${e://Field/siteCode}/
If the user goes back and edits the single select field response then the default text field is not getting updated - how do I achieve this so it always updates?

Hi there, I think the default text is being saved as a survey answer and that is why it is not changing when going back and selecting a different response. To tackle this, we can use JavaScript to clear out the existing text when the page loads and then add in the piped text for the previous answer.
In your text entry question, remove the Default Choices from the Qualtrics UI and add the below JavaScript to the Onload section, updating the QID for whichever question contains the text you'd like to set (QID8 in my case):
jQuery("#"+this.questionId+" .InputText").val("");
jQuery("#"+this.questionId+" .InputText").val("${q://QID8/ChoiceGroup/SelectedChoices}");


Leave a Reply