jQuery("#"+this.questionId+" li input[type=text]").val("");
However, if a user comes back to review their answer, the box appears to have lost its value. Another question on this forum suggests this code that will retain the value and show it to the user:
var inputs = jQuery("#"+this.questionId+" .SumInput input");
if(inputs.filter(function() {return this.value != "0";}).length == 0) {
inputs.val("");
}
This is great for retaining the value but still shows a default 0 and stores a 0 in the data even if the user did not actually enter a 0.
I want to:
1. remove the display of the prefilled 0.
2. Retain the value of what the user entered, including if it is a 0.
3. do not submit a default value of 0 when the user has not interacted with the question.
Is this possible? Thanks in advance for your help
Best answer by TomG
View original