- Posts: 153
- Thank you received: 8
Ask the community, share ideas, and connect with other LimeSurvey users!
Sorry Tony,tpartner wrote: There is no JavaScript method to detect when an element is hidden or to detect class changes so you would need to put listeners on the questions that are triggering the relevance change.
It's the case (by default) when move next only, then if user check a input:checkbox by error , it don't loose previous answer.In other words, when a question was answered, but then the relevance equation changes to wrong (not relevant), the question becomes hidden, and then the answer input of respondents in the question should be removed (cleaned).
I think we don't need solution, since LS behaviour cleanup value when move next.tpartner wrote: @DenisChenu, no need to apologize. Do you have a solution?
var grass = $( '#question{QID} input.form-control.em_sq_validation:eq(2)').val(); if(grass > 0) { $( '#question{QID} input.form-control.em_sq_validation:eq(3)').attr({ "max" : grass }); }else { $( '#question{QID} input.form-control.em_sq_validation:eq(3)').removeAttr('max'); }