Remove zero in entry box | XM Community
Skip to main content

I would like to remove zeros from entry boxes for Constant Sum questions. I have attempted solutions offered from this previous post, my comments are below https://www.qualtrics.com/community/discussion/1509/remove-zeros-from-matrix-table-user-view

  • When a space is inserted in Default Choices as suggested it creates invalidation when answering the survey due to the space needing to be deleted.

  • When I tried following suggested code below it didn't work, should I be altering the code to suit my survey? I don't know JS.

Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" td input[type=text]").val("");
});
  • The first suggestion from that post worked, however when the question relies on Choice Statements from an earlier question and a choice is skipped (i.e. not all choices are selected) the zero appears in the entry box for all Choice Statements following the unselected choice in that question. Example of my code below.

document.getElementById('QR~QID200~x1').value="";
               document.getElementById('QR~QID200~x2').value="";
               document.getElementById('QR~QID200~x3').value="";
               document.getElementById('QR~QID200~x4').value="";
               document.getElementById('QR~QID200~x5').value="";
               document.getElementById('QR~QID200~x7').value="";
image.pngimage.pngThank you

Use below code in onReady function:
  jQuery("#"+this.questionId+" inpututype=text]").val("");


rondev,
Thank you very much. Now working perfectly.


Leave a Reply