Sure, please find in the attachment.
Unfortunately, there is a failure on moving the radios into the table via JavaScript. I was wondering what seems to be the problem?
It's my first time to use limesurvey and javascript, everything is new for me. Thank you for your patience!
The codes I used are:<table border="1" cellpadding="0" cellspacing="0" style="border-collapse:collapse;"> <tbody> <tr> <td colspan="2" style="text-align: center;" width="10%"> </td> <td bgcolor="#308737" style="text-align: center;" width="12%"><br /><span style="color:#ffffff;font-size:20px;"><span style="color:#ffffff;font-size:20px;"><strong>Option 1</strong></span><br /> </span></td> <td bgcolor="#308737" style="text-align: center;" width="12%"><span style="color:#ffffff;font-size:20px;"><span style="color:#ffffff;font-size:20px;"><strong>Option 2</strong></span> </span></td> <td bgcolor="#308737" style="text-align: center;" width="12%"><br /><span style="color:#ffffff;font-size:20px;"><span style="color:#ffffff;font-size:20px;"><strong>Option 3</strong></span><br /> </span></td> <td bgcolor="#308737" style="text-align: center;" width="12%"><span style="color:#ffffff;font-size:20px;"><span style="color:#ffffff;font-size:20px;"><strong>Option 4</strong></span> </span></td> <td bgcolor="#308737" style="text-align: center;" width="12%"><br /><span style="color:#ffffff;font-size:20px;"><span style="color:#ffffff;font-size:20px;"><strong>Option 5</strong></span><br /> </span></td> <td bgcolor="#308737" style="text-align: center;" width="12%"><span style="color:#ffffff;font-size:20px;"><span style="color:#ffffff;font-size:20px;"><strong>Option 6</strong></span> </span></td> <td bgcolor="#308737" style="text-align: center;" width="12%"><span style="color:#ffffff;font-size:20px;"><span style="color:#ffffff;font-size:20px;"><strong>Option 7</strong></span> </span></td> <td bgcolor="#308737" style="text-align: center;" width="12%"><span style="color:#ffffff;font-size:20px;"><span style="color:#ffffff;font-size:20px;"><strong>None of them</strong></span> </span></td> </tr> <tr> <td bgcolor="#c1c1c1" colspan="2" style="text-align: center;"><span style="font-size:14px;">Attribute type</span> </td> </td> <td bgcolor="#f2f2f2" style="text-align: center;"><span style="font-size:20px;"><strong> Attribute 1</strong></span></td> <td bgcolor="#f2f2f2" style="text-align: center;"><span style="font-size:20px;"><strong> Attribute 2</strong></span></td> <td bgcolor="#f2f2f2" style="text-align: center;"><span style="font-size:20px;"><strong> Attribute 3</strong></span></td> <td bgcolor="#f2f2f2" style="text-align: center;"><span style="font-size:20px;"><strong> Attribute 4</strong></span></td> <td bgcolor="#f2f2f2" style="text-align: center;"><span style="font-size:20px;"><strong> Attribute 5</strong></span></td> <td bgcolor="#f2f2f2" style="text-align: center;"><span style="font-size:20px;"><strong> Attribute 6</strong></span></td> <td bgcolor="#f2f2f2" style="text-align: center;"><span style="font-size:20px;"><strong> Attribute 7</strong></span></td> <td style="text-align: center;" width="37%"><span style="font-size:20px;"><span style="font-size:20px;"><strong> </strong></span> </span></td> </tr> <tr> <td bgcolor="#c1c1c1" colspan="2" style="text-align: center;"><span style="font-size:14px;">Make a choice </span></td> <td bgcolor="#308737" style="text-align: center;"> </td> <td bgcolor="#308737" style="text-align: center;"> </td> <td bgcolor="#308737" style="text-align: center;"> </td> <td bgcolor="#308737" style="text-align: center;"> </td> <td bgcolor="#308737" style="text-align: center;"> </td> <td bgcolor="#308737" style="text-align: center;"> </td> <td bgcolor="#308737" style="text-align: center;"> </td> <td bgcolor="#308737" style="text-align: center;"> </td> </tr> </tbody></table><script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify this question var thisQuestion = $('#question{QID}'); // Move the radios $('.question-text table:eq(0) tr:last td:eq(1)', thisQuestion).append($('.subquestion-list .answers-list:eq(0) .answer-item:eq(0) *', thisQuestion)); $('.question-text table:eq(0) tr:last td:eq(2)', thisQuestion).append($('.subquestion-list .answers-list:eq(0) .answer-item:eq(1) *', thisQuestion)); $('.question-text table:eq(0) tr:last td:eq(3)', thisQuestion).append($('.subquestion-list .answers-list:eq(0) .answer-item:eq(2) *', thisQuestion)); $('.question-text table:eq(0) tr:last td:eq(4)', thisQuestion).append($('.subquestion-list .answers-list:eq(0) .answer-item:eq(3) *', thisQuestion)); $('.question-text table:eq(0) tr:last td:eq(5)', thisQuestion).append($('.subquestion-list .answers-list:eq(0) .answer-item:eq(4) *', thisQuestion)); $('.question-text table:eq(0) tr:last td:eq(6)', thisQuestion).append($('.subquestion-list .answers-list:eq(0) .answer-item:eq(5) *', thisQuestion)); $('.question-text table:eq(0) tr:last td:eq(7)', thisQuestion).append($('.subquestion-list .answers-list:eq(0) .answer-item:eq(6) *', thisQuestion)); $('.question-text table:eq(0) tr:last td:eq(
', thisQuestion).append($('.subquestion-list .answers-list:eq(0) .answer-item:eq(7) *', thisQuestion)); // Some classes for presentation $('.question-text table:eq(0) input:radio', thisQuestion).closest('td').addClass('answer-item radio-item text-center radio'); $('.question-text table:eq(0) .radio-item label', thisQuestion).show(); // Click event on the table cells $('.question-text table:eq(0) .radio-item', thisQuestion).on('click', function(e) { $('input:radio', this).trigger('click'); }); $('.question-text table:eq(0) input:radio', thisQuestion).on('click', function(e) { e.stopPropagation(); }); // Clean-up styles $('.answer-container', thisQuestion).hide(); $('.question-text table:eq(0) .label-text', thisQuestion).remove(); $('.question-text table:eq(0) .radio-text', thisQuestion).css({ 'cursor': 'pointer' }); $('td.radio', thisQuestion).css({ 'display': 'table-cell', 'padding': '5px' }); });</script>