- Posts: 120
- Thank you received: 1
Ask the community, share ideas, and connect with other LimeSurvey users!
It's a hint. I never used it myself.This workaround is heavily based on the Card Sorting above. It uses JavaScript to allow dragging items into "buckets" to "card sort" them with the additional twist to limit the cards per bucket. A multiple-short-text question is used with subquestions being the draggable items. The data recorded for each item is the "bucket" number that it was dropped in. "Buckets" and their limits are pre-defined in a list in the "Display" section of the question.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Yes, in surveys requiring large tables to show lots of information for choice comparisons I sniff the screen size in the welcome message and, if too small, remove the "Next" button and display a suggestion that they return using a larger device....we force the use of desktops. Otherwise screenout.
Please Log in to join the conversation.
Please Log in to join the conversation.
<style type="text/css"> .card-sort-question .items-start { width: 94%; max-width: 100%; height: auto; min-height:80px; margin-top: 8px; margin-left: 3%; border: 1px solid #666; -moz-border-radius: 6px; -webkit-border-radius: 6px; -khtml-border-radius: 6px; border-radius: 6px; } .card-sort-question .card { width: auto; min-width:80px; height: auto; margin: 5px 5px; padding: 4px; background-color: transparent; background-color: #5bc0de; color: #fcf8e3; border:0; -moz-border-radius: 0px; -webkit-border-radius: 0px; -khtml-border-radius: 0px; border-radius: 0px; } .card-sort-question .items-end-wrapper { float: left; margin-left: 3%; width: 94%; max-width: 100%; margin-top: 15px; } @media (min-width: 560px){ .card-sort-question .items-end-wrapper { display: flex; } } .card-sort-question .items-end-inner { display: inline-block; width:100%; margin-right: 0.5%; margin-left: 0.5%; } .card-sort-question .items-end { min-height: 60px !important; } .card-sort-question .items-end-text { text-align:left; } .card-sort-question .items-end .card { margin: 5px 7px; color: #fcf8e3; background-color:#5bc0de; } </style>
Please Log in to join the conversation.
Which boxes?he still insists that he wants each of the boxes to be a different color,
Please Log in to join the conversation.
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify this question 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); }); }); // Listener on the radios $('input:radio', thisQuestion).on('click', function(i) { $(this).closest('tr').find('.active-item').removeClass('active-item'); $(this).closest('td').addClass('active-item'); }); }); </script>
<style type="text/css"> /* set width of "gradient" header */ .custom-array table.subquestion-list thead td, .custom-array table.subquestion-list thead th { border-bottom-width: 30px; border-bottom-style: solid; } /* set colors of "gradient" header */ .custom-array table.subquestion-list thead .column-1 { border-bottom-color: #000000; } .custom-array table.subquestion-list thead .column-2 { border-bottom-color: #330000; } .custom-array table.subquestion-list thead .column-3 { border-bottom-color: #660000; } .custom-array table.subquestion-list thead .column-4 { border-bottom-color: #990000; } .custom-array table.subquestion-list thead .column-5 { border-bottom-color: #b30000; } .custom-array table.subquestion-list thead .column-6 { border-bottom-color: #cc0000; } .custom-array table.subquestion-list thead .column-7 { border-bottom-color: #ff0000; } /* set colors of hovered resp. active(selected) cells */ /* Of course you can split this to have different colors for hovered and active cells */ .custom-array td.column-1:hover, .custom-array td.active-item.column-1 { background-color: #000000; opacity:1.0; } .custom-array td.column-2:hover, .custom-array td.active-item.column-2 { background-color: #330000; opacity:1.0; } .custom-array td.column-3:hover, .custom-array td.active-item.column-3 { background-color: #660000; opacity:1.0; } .custom-array td.column-4:hover, .custom-array td.active-item.column-4 { background-color: #990000; opacity:1.0; } .custom-array td.column-5:hover, .custom-array td.active-item.column-5 { background-color: #b30000; opacity:1.0; } .custom-array td.column-6:hover, .custom-array td.active-item.column-6 { background-color: #cc0000; opacity:1.0; } .custom-array td.column-7:hover, .custom-array td.active-item.column-7 { background-color: #ff0000; opacity:1.0; } /* set colors of normal columns */ /* The same colors as above but with an opacity of 0.4 */ td.answer_cell_1 { background-color: #000000; opacity:0.4; } td.answer_cell_2 { background-color: #330000; opacity:0.4; } td.answer_cell_3 { background-color: #660000; opacity:0.4; } td.answer_cell_4 { background-color: #990000; opacity:0.4; } td.answer_cell_5 { background-color: #b30000; opacity:0.4; } td.answer_cell_6 { background-color: #cc0000; opacity:0.4; } td.answer_cell_7 { background-color: #ff0000; opacity:0.4; } /* Some other settings */ /* Vertical Alignment of header text */ .ls-answers .ls-heading > th { vertical-align: top; } /* Left Alignment of subquestion text */ .ls-answers tbody .answertext { text-align: left; } </style>