Hi all, I have a constant sum matrix type where each box needs to have a number between 0 and 100. Additionally, I want to remove the prefilled zeroes and have blank spaces instead.
I use the following code to remove the prefilled zeroes
Qualtrics.SurveyEngine.addOnload(function(){
jQuery("#"+this.questionId+ "td input[type=text]").val("");
});
and I use custom validation with "greater than or equal to 0" and "less than or equal to 100" in each box.
The problem is that if only one of the many boxes does not satisfy the condition, ALL the boxes become blank, so you need to start again.
Is there a way, in which you get the error message and you are not allowed to pass to the next question, BUT none of the answers, or only the answers that do not satisfy the condition, are deleted?
Thanks!
Solved
remove auto delete while deleting prefilled zeroes in constant sum
Best answer by TomG
In your addOnload function you need to check to make sure the values are zero before changing them to blank.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.