JS overriding entries in Response Summary | XM Community
Skip to main content

I am using the JS below to remove the zeros from Constant Sum questions for easy completion for respondents.
jQuery("#"+this.questionId+" input[type=text]").val("");
But no entries in these questions are displaying in the Response Summary now.
Help please.

You can add an addOnPageSubmit function to change the blanks back to zero when the respondent clicks the next button.


Thanks TomG,
Would the addOnPageSubmit function then show entries in the Response Summary?
If so, is this addOnPageSubmit function JS?
Could you kindly share what that should look like?
Thank you


Qualtrics.SurveyEngine.addOnPageSubmit(function() {
jQuery("#"+this.questionId+" input[type=text]").each(function(){if(this.value.length==0) this.value="0";});
});


Thank you very much TomG, unfortunately this hasn't solved my problem yet.
Below is a copy of my question in Editor, Response Summary (blank although numbers entered) and in Data and Analysis (numbers displayed).
image.pngimage.pngimage.pngimage.png


Leave a Reply