- Posts: 10
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // The number of answers to be fixed at the end of the list var fixedAnswers = 2; //Hier gedacht als "Sonstige" und "K.A." // Identify this question var qID = {QID}; // Find the number of answers var ansCount = $('#question'+qID+' .answer-item').length; // Place the last n answers created at the end of the list var fixedIndex = fixedAnswers - 1; for (var i=0; i<fixedAnswers; i++) { var answer = $('input[id^="answer"][id$="X'+qID+(ansCount-fixedIndex)+'"]'); var answerItem = $(answer).closest('.answer-item'); var answersList = $(answer).closest('.answers-list'); if($('#question'+qID).hasClass('multiple-opt')) { answerItem = $(answer).closest('.answer-item').parent(); answersList = $(answer).closest('.subquestion-list'); } $(answersList).append(answerItem); fixedIndex--; } }); </script
// Define the sub-question codes to be placed last var lastItems = ['SQ006', 'SQ007', 'SQ008'];
// The number of answers to be fixed at the end of the list var fixedAnswers = 2; //Hier gedacht als "Sonstige" und "K.A."
if($('#question'+qID).hasClass('multiple-opt'))
if($(thisQuestion).hasClass('array-flexible-row'))
Mit farbcodiert war dein Post #157602 gemeint, in welchem du Antwortoptionen in unterschiedlichen Farben darstelltest.