- Posts: 112
- Thank you received: 6
Ask the community, share ideas, and connect with other LimeSurvey users!
What workaround? The manual has no workaround for LS3 (but for no longer maintained versions of LimeSurvey).Matadeleo wrote: Hi guys, I was looking at the Max Diff workaround
Never seen one. But sets/prohibitions would be still have to be set question by question. I would never do that in LimeSurvey. Would cost to much time. The risk to have a bug in the survey design would be too high. At least if you use it in a business project. Academic research might have longer project-times. But you can get MaxDiff capable tools (SaaS) for 1,800 USD per year. And if you're doing a lot of MaxDiff you mostly end up with more costly solutions anyway (10,000 USD per year).Matadeleo wrote: Also - has anyone managed to make a true max diff work in LimeSurvey, complete with sets/prohibitions etc??
Sounds like more work in the end.Matadeleo wrote: One option I'm considering is to build a MaxDiff in PHP, split the survey into 2 and then attempt to pass ID's and data between them all. Passing so much data via URI makes me nervous though.
The question type isn't offering subquestion relevance. So prohibitions are not easily done inside LS.
That way you get a set (n pages of tasks).
You may now offer 2-3 versions of a set (different layout) to prevent effects ("e.g. always choose first item).
Via a random number you expose version 1,2 or 3.
{rand(1,X)}
function maxDiff(qID, randomize) { // Identify some elements var thisQuestion = $('#question'+qID); var thisTable = $('table.subquestion-list:eq(0)', thisQuestion); // Assign a new question class $(thisQuestion).addClass('max-diff-array'); // Move the columns $('thead tr:eq(0)', thisTable).prepend($('thead tr:eq(0) th:eq(1)', thisTable)); $('tr.answers-list', thisTable).each(function(i){ $('td.answer-item:eq(0)', this).prependTo(this); }); // Random rows if(randomize) { var rowsArr = []; $('tr.answers-list', thisTable).each(function(i){ $(this).attr('data-index', i); rowsArr.push(i); }); shuffleArray(rowsArr); $(rowsArr).each(function(i){ $('tbody', thisTable).append($('tr[data-index="'+this+'"]', thisTable)); }); } // Prevent clicking twice in the same row $('input:radio', thisQuestion).on('click', function () { $('input:radio', thisQuestion).prop('disabled', false); $('input:radio:checked', thisQuestion).each(function(i) { var thisRow = $(this).closest('tr.answers-list'); $('input:radio', thisRow).not(this).prop('disabled', true); }); }); // Fix up the row classes var rowClass = 1; $('tr.answers-list', thisTable).each(function(i) { $(this).addClass('array'+(2-(i%2))); }); } function shuffleArray(array) { for (var i = array.length - 1; i > 0; i--) { var j = Math.floor(Math.random() * (i + 1)); var temp = array[i]; array[i] = array[j]; array[j] = temp; } return array; }
Yes. And in LS 3 the validation is working with unique(self). The older LS version had no validation on that question type.DenisChenu wrote: It's a array by columns question type ?