Hi,
So you want to misuse this question type by packing three questions into it?
The clean solution would be to ask the question about the amount of compromisation, and afterwards the dual array only about the selected option.
Another solution with your approach would be a simple validation equation.
But a dual array has no option for a validation equation.
But you may use an array(text) with dropdown option.
Here you just check that
- there are either 0 or 2 mentions in each row
- that there are exact two mentions in the entire question
Unfortunately you did not answer the questions at the beginning about the version of LimeSurvey you are using and how and where it is hosted.
Therefore we can't say if you can use this javascript solution.
Nevertheless here it is:
array(text), y-axis coded "Y001", "Y002",... x-axis coded "X001", "X002", ...
Insert this script into the question text (source code mode)
Code:
<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:scriptcomplete',function(){
var thisQuestion = $('#question{QID}');
$('.answer-item.answer_cell_X001', thisQuestion).addClass('with-select').append('<select class="inserted-select form-control list-question-select">\
<option value="">...</option>\
<option value="1">Option 1</option>\
<option value="2">Option 2</option>\
<option value="3">Option 3</option>\
<option value="4">Option 4</option>\
<option value="5">Option 5</option>\
</select>');
$('.answer-item.answer_cell_X002', thisQuestion).addClass('with-select').append('<select class="inserted-select form-control list-question-select">\
<option value="">...</option>\
<option value="1">Option a</option>\
<option value="2">Option b</option>\
<option value="3">Option c</option>\
<option value="4">Option d</option>\
<option value="5">Option e</option>\
</select>');
// Listeners
$('.inserted-select', thisQuestion).on('change', function(i) {
if($(this).val() != '') {
$(this).closest('.answer-item').find('input:text').val($('option:selected', this).val()).trigger('change');
}
else {
$(this).closest('.answer-item').find('input:text').val('').trigger('change');
}
});
// Returning to page
$('.with-select input:text', thisQuestion).each(function(i) {
var thisCell = $(this).closest('.answer-item');
var inputText = $.trim($(this).val());
$('select.inserted-select', thisCell).val(inputText);
});
// Clean-up styles
$('select.inserted-select', thisQuestion).css({
'max-width': '100%'
});
$('.with-select input:text', thisQuestion).css({
'position': 'absolute',
'left': '-9999em'
});
});
</script>
And the question validation equation (linefeed for clarification)
Code:
count(self)==2 and
count(self.sq_X001)<2 and
count(self.sq_X002)<2 and
(count(self.sq_Y001)==0 OR count(self.sq_Y001)==2) and
(count(self.sq_Y002)==0 OR count(self.sq_Y002)==2) and
(count(self.sq_Y003)==0 OR count(self.sq_Y003)==2) and
(count(self.sq_Y004)==0 OR count(self.sq_Y004)==2) and
(count(self.sq_Y005)==0 OR count(self.sq_Y005)==2)
Now you can use a general tip like
"Please, select only <b>one</b> option and for that choice indicate the time metric <b>and</b> the efficiency metric"
or you give more specific tips using IF:
{if(condition1,tip1,'')}({if(condition2,tip2,'')}
Best you send the lss export of these relevant questions. So we see your coding.
.
Joffm