- Posts: 3
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // Maximun answers var maxAnswers = 3; // Identify this question var thisQuestion = $('#question{QID}'); function checkMax() { $('input.checkbox', thisQuestion).prop('disabled', false); if($('input.checkbox:checked', thisQuestion).length >= maxAnswers) { $('input.checkbox', thisQuestion).not(':checked').prop('disabled', true); } } // Initial checkbox states checkMax(); // Listener on the checkboxes $('input.checkbox', thisQuestion).change(function(e) { checkMax(); }); // Remove any "disabled" properties before submitting $('#movenextbtn, #movesubmitbtn').bind('click', function () { $('input.checkbox', thisQuestion).prop('disabled', false); }); }); </script>
Jelo wrote: How can you type with your hands behind your head?
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { keepPos('{SGQ}',['SQ004|4']) // keepPos('{SGQ}',['code|position']) }); </script>