- Posts: 5
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
$(document).ready(function() { $('#movenextbtn, #movesubmitbtn').click(function () { var subNum = 0; //replace the 5 with the number of array rows you have. for(var i = 0;i < 5;i++) { subNum = i + 1; console.log(subNum); //replace "java936471X86X336a" with your id that stores the array value. You will find it under ".answertext". if(document.getElementById('java936471X86X336a'+subNum).value >= "2") { //replace the question number with your multiple choice questions number. $('#question342 .checkbox:eq('+i+')').attr('checked', true).triggerHandler('click'); } } }); });