- Posts: 33
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<style type="text/css"> .custom-array table.subquestion-list col { width: auto !important; } .custom-array table.subquestion-list thead td, .custom-array table.subquestion-list thead th { border-bottom-width: 8px; border-bottom-style: solid; } .custom-array table.subquestion-list thead .column-0 { padding: 0; width: 0; } .custom-array table.subquestion-list thead .column-1 { border-bottom-color: #A80200; width:18%; } .custom-array table.subquestion-list thead .column-2 { border-bottom-color: #C15A00; width:8%; } .custom-array table.subquestion-list thead .column-3 { border-bottom-color: #D69D00; width:8%; } .custom-array table.subquestion-list thead .column-4 { border-bottom-color: #E4C900; width:8%; } .custom-array table.subquestion-list thead .column-5 { border-bottom-color: #ECE200; width:8%; } .custom-array table.subquestion-list thead .column-6 { border-bottom-color: #E2EC00; width:8%; } .custom-array table.subquestion-list thead .column-7 { border-bottom-color: #9CE400; width:8%; } .custom-array table.subquestion-list thead .column-8 { border-bottom-color: #9DD600; width:8%; } .custom-array table.subquestion-list thead .column-9 { border-bottom-color: #5AC100; width:8%; } .custom-array table.subquestion-list thead .column-10 { border-bottom-color: #00A800; width:18%; } /* und so weiter, der Rest bleibt */
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>