How to hide the auto-populated zeros | XM Community
Skip to main content

I have a Matrix/constant sum type question without the “Total” row. How do I hide the auto-populated zeros? See attached image.

I have the following JS but this does not work --

Qualtrics.SurveyEngine.addOnload(function()
{
    
/*TO HIDE THE ZEROS IN THE TEXT BOXES (DEFAULT)*/
    
    var inputs = jQuery("#"+this.questionId+" .SumInput");
    if(inputs.filter(function() {return this.value != "0";}).length == 0) {
        inputs.val("");
         }
});

 

Try:

Qualtrics.SurveyEngine.addOnload(function() {
var inputs = jQuery(this.questionContainer).find(".ChoiceRow td").not(".CSTotal").find("[type=text]");
if(inputs.filter(function() {return this.value != "0";}).length == 0) inputs.val("");
});

 


Yes - that works! thank you so much Tom!


Leave a Reply