- Posts: 2
- 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() { // Identify the questions var q1 = $('#question{QID}'); var qHidden = q1.nextAll('.multiple-opt:eq(0)'); // Hide qHidden qHidden.hide(); // Listeners on the Q1 input $('input[type="text"]', q1).on('change keyup', function(e, value) { var q1Value = $(this).val(); // Reset the hidden question $('input.checkbox', qHidden).prop('checked', false); $('li.question-item input[type="hidden"]', qHidden).attr('value', ''); // Check the appropriate boxes in qHidden $('li.question-item:lt('+q1Value+') input.checkbox', qHidden).prop('checked', true); $('li.question-item:lt('+q1Value+') input[type="hidden"]', qHidden).attr('value', 'Y'); // Loop through subquestions in qHidden and fire the Expression Manager checkconditions() function $('input.checkbox', qHidden).each(function(i) { checkconditions(this.value, this.name, this.type); }); }); }); </script>
tpartner wrote: ...you will need to use a variation of this workaround...