- Posts: 62
- Thank you received: 3
Ask the community, share ideas, and connect with other LimeSurvey users!
(count(self.sq_A.NAOK)==10 and count(self.sq_B.NAOK)==5)) and ( (count(self.sq_SY01.NAOK) < 2) and (count(self.sq_SY02.NAOK) < 2) end ...... (count(self.sq_SY15.NAOK) < 2) )
www.limesurvey.org/manual/Expression_Man....27that.27_variablessq_X - where X is a row or column identifier. Only sub-questions matching pattern X are selected. Note that search is done on complete code identifier, then sq_X match and include subquestions nX, X, Xn (e.g. if you use sq_1, subquestions a1, 1a, 1, 11 or 001 was included). Put attention at dual scale question type where subquestions code are QCODE_SQCODE_1 and QCODE_SQCODE_1 and to ranking question type where subquestions code are QCODE_1,QCODE_2 ....
I've finally put all the code together, and the validation works fine.tpartner wrote: Place your equation in the "Question validation equation" field under "Advanced settings", not in the "Validation" field - that's a legacy field for Regex's.
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // Identify this question //var thisQuestion = $('#question{QID}'); var thisQuestion = $('#question1955'); $('input.checkbox', thisQuestion).on('change', function(e) { cancelBubbleThis(e); if(this.checked) { var thisRow = $(this).closest('tr.subquestion-list'); var thisItem = $(this).closest('.answer-item'); $('.answer-item', thisRow).not(thisItem).each(function(i) { $('input.checkbox', this).prop('checked', false); $('input:hidden', this).attr('value', ''); checkconditions(this.value, this.name, this.type); }); } }); }); </script>