- Posts: 14485
- Thank you received: 4401
Ask the community, share ideas, and connect with other LimeSurvey users!
Das ist etwas sehr falsch gedacht.ob man in der Gruppenrelevanz in diesem Fall statt "! is_empty(Q1_SQ001)" das ganze mit dem Operator AND verbindet und "! is_empty(Q1_SQ001) AND ! is_empty(Q1_SQ001)"
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ var thisQuestion = $('#question{QID}'); // Add a question class thisQuestion.addClass('custom-array'); // Column-specific classes $('table.subquestion-list tr', thisQuestion).each(function(i) { $('th, td', this).each(function(i) { $(this).addClass('column-'+i); }); }); // Insert selects $('.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">μg (Mikrogramm)</option>\ <option value="2">mg (Milligramm)</option>\ <option value="3">g (Gramm)</option>\ <option value="4">ml (Milliliter)</option>\ <option value="5">Tropfen</option>\ <option value="6">IE (Internationale Einheiten)</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>
Ach, was. Das passiert eben. Mir doch auch.ich bin auch doof... Habe beim Testen immer nur ein Medikament eingegeben