this affected the calculations at the later stages
That should be the least thing - to change this variable in the calculation or even insert an equation to set a variable of the desired type and name.
is it possible to add a warning being shown when a respondent clicks the button and fills the boxes at the same time
Of course. This is simple validation.
As you still seem to stick to the multi question solution,
one question to show the text and two to enter the data,
you may insert the validation equation in the second question (now you can't proceed)
and you may include your error message in the text question displayed by an IF-statement (here shown as alert)
You may read about alerts here
[url]
getbootstrap.com/docs/3.4/javascript/#alerts
[/url]
or read my "Tutorial III: Gimmicks" in the German section.
Like this
Not the best solution, but possible.
Or this easy solution:
question of type "multiple short text"
first subquestion with inserted dropdown
Code:
<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:complete',function() {
var qID = {QID};
var inputNum = 1;
// Define the select element (dropdown)
var prov1 = '<select id="prov1" class="form-control">\
<option value="">--Bitte, wählen--</option>\
<option value="1">Stunde</option>\
<option value="2">Monat</option>\
<option value="3">Jahr</option>\
<option value="4">Keine Ahnung</option>\
</select>';
// Hide the text input
$('#question'+qID+' .question-item:eq('+(inputNum-1)+') input[type="text"]').hide();
// Insert the select elements
if($('#question'+qID+' .question-item:eq('+(inputNum-1)+') select').length == 0) {
$('#question'+qID+' .question-item:eq('+(inputNum-1)+') input[type="text"]').before(prov1);
}
// Initially select an option if the question has already been answered
$('#question'+qID+' select').each(function(i) {
if($.trim($(this).next('input[type="text"]').val()) != '') {
$(this).val($.trim($(this).next('input[type="text"]').val()));
}
});
// Listener on the dropdowns - insert selected values into hidden text input
$('#question'+qID+' select').change(function() {
var thisInput = $(this).next('input[type="text"]');
$(thisInput).val($(this).val());
checkconditions($(thisInput).attr('value'), $(thisInput).attr('name'), 'text');
});
// Some styles
$('#question'+qID+' select').css({
'margin':'0.3em 0 0 0'
});
});
</script>
second subquestion with
subquestion relevance equation: Q1_SQ001!=4
and array filter type set to "deaktiviert"
Joffm
Außerdem habe ich Euch dazu jetzt genug gezeigt.