- Posts: 88
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
<script type="text/javascript" data-author="Tony Partner"> $(document).on('ready pjax:scriptcomplete',function(){ var thisQuestion = $('#question{QID}'); var firstRow = $('tr.subquestion-list:eq(0)', thisQuestion); // Listener on the first row checkboxes $(':checkbox', firstRow).on('change', function(e){ $(':checkbox', thisQuestion).prop('disabled', false); if($(this).is(':checked')) { var thisCell = $(this).closest('td'); var thisIndex = $(thisCell).index(); // Render this checkbox exclusive in this row var otherRowCells = $('td.answer-item', firstRow).not(thisCell); $(otherRowCells).each(function(i) { $('input[type="hidden"]', this).val(''); $(':checkbox', this).prop('checked', false).trigger('change'); }); // Render this checkbox exclusive in this column var otherColCells = $('td.answer-item:nth-child('+(thisIndex+1)+')').not(thisCell); $(otherColCells).each(function(i) { $('input[type="hidden"]', this).val(''); $(':checkbox', this).prop('checked', false).trigger('change').prop('disabled', true); }); } }); }); </script>
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.