(Write here your question/remark)
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
LimeSurvey Community Edition
Version 5.4.3+220926
Own server or LimeSurvey hosting: University/organization
Survey theme/template: Array and List (radio)
==================How can I add a reset button? I tried copying the Java Codes on the following thread, but the button seems not to work. I tried the code found on this thread, but it didn't work, maybe because it's suitable for older versions only.
I'm using two formats: an Array and a list, non-mandatory answers, and "No answer" is hidden. I wanted to put a reset button on the right side of the table that reverts to empty answers. Please see the image below.
Here's the code I used for the Array but it is not working.
Attachment not found
Attachment not found
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
addReset('{QID}');
function addReset(qID) {
$('#question'+qID+' table.subquestions-list thead tr').append('<th />');
$('#question'+qID+' tr.answers-list').append('<td class="buttonCell"><input type="button" value="Reset" class="resetButton" /></td>');
$('#question'+qID+' .resetButton').click(function(e){
var parentRow = $(this).closest('tr');
$('input.radio', parentRow).attr('checked', false);
});
}
});
</script>