Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

List with comment horizontally

More
2 years 11 months ago #231990 by FraWol
Please help us help you and fill where relevant:
Your LimeSurvey version: 3.28.22
Own server or LimeSurvey hosting: own server
Survey theme/template: fruity (modified)
==================
Hello,
Is there a way to display a List with comment question horizontally and the comment-box below it.
Thanks.

Please Log in to join the conversation.

More
2 years 11 months ago #231992 by tpartner
There is no "Display columns" setting for that question type but you can achieve it by modifying and inserting some Bootstrap classes via JavaScript and adding a little CSS.

Insert something like this into the question source. (you will need to modify the Bootstrap classes for more or less "columns")

Code:
<script type="text/javascript" data-author="Tony Partner">
  $(document).on('ready pjax:scriptcomplete',function(){
 
    var thisQuestion = $('#question{QID}')
 
    // Modify some Bootstrap classes
    $('.answers-list, .answer-item.text-item', thisQuestion).removeClass('col-sm-6');
    $('.answer-item.radio-item', thisQuestion).addClass('col-xs-12 col-sm-3');
  });
</script>
Code:
<style type="text/css" data-author="Tony Partner">
 
  #question{QID} .radio-list li {
    margin-right: 0;
    clear: none;
  }
</style>



Sample survey attached: 

File Attachment:

File Name: limesurvey...3(1).lss
File Size:17.57 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: FraWol

Please Log in to join the conversation.

More
2 years 11 months ago #231999 by FraWol
Thank you very much, works great.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose