- Posts: 37
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Question about placement of answers in List with comment questions
- midnightking
- Topic Author
- Offline
- Junior Member
Less
More
3 years 5 months ago #207974
by midnightking
Question about placement of answers in List with comment questions was created by midnightking
I was wondering if it is possible to have possible answers be side by side , a certain distance one from the other, rather than one on top of the other in a list with comment question.
If so, how do I use JavaScript to do it? Thanks
If so, how do I use JavaScript to do it? Thanks
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
3 years 5 months ago #208027
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Question about placement of answers in List with comment questions
LimeSurvey version?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- midnightking
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 37
- Thank you received: 0
3 years 5 months ago #208086
by midnightking
Replied by midnightking on topic Question about placement of answers in List with comment questions
yes
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
3 years 5 months ago #208094
by DenisChenu
You can add where your hosted too (survey base url)
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Question about placement of answers in List with comment questions
@tpartner ask for your LimeSurvey versiontpartner wrote: LimeSurvey version?
You can add where your hosted too (survey base url)
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
3 years 5 months ago #208119
by holch
This is going to be funny...
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Question about placement of answers in List with comment questions
Limesurvey Version?
Yes.
This is going to be funny...
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- midnightking
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 37
- Thank you received: 0
3 years 5 months ago #208142
by midnightking
Replied by midnightking on topic Question about placement of answers in List with comment questions
3.24.6
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
3 years 5 months ago - 3 years 5 months ago #208196
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Question about placement of answers in List with comment questions
You could apply buttons as in the "Bootstrap Buttons" question theme for a normal list radio question.
Add this script to the question source.
(this could also be accomplished with a new custom question theme)
Sample survey attached:
Add this script to the question source.
(this could also be accomplished with a new custom question theme)
Code:
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify this question var thisQuestion = $('#question{QID}'); // Modify classes $('.answers-list', thisQuestion).removeClass('col-sm-6 col-xs-12').addClass('row ls-answers form-inline'); $('.answer-item input:radio', thisQuestion).addClass('bootstrap-radio sr-only'); $('.answer-item label', thisQuestion).removeClass('radio-label control-label'); // Insert the Bootstrap buttons $('.answer-container', thisQuestion).prepend('<div class="container-fluid" />'); $('.answer-container > .container-fluid', thisQuestion).append($('.answers-list', thisQuestion)); $('.answer-item.radio-item', thisQuestion).each(function(i) { var thisID = $(this).attr('id'); $('.answers-list', thisQuestion).append( '<div id="'+thisID+'" class="bootstrap-buttons-div col-xs-12 col-sm-2 inserted-button-div">\ <div class="button-item btn btn-primary col-xs-12 col-sm-12"></div>\ </div>' ); $('div.inserted-button-div[id="'+thisID+'"] .button-item', thisQuestion).append($('*', this)); }); }); </script>
Sample survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 3 years 5 months ago by tpartner.
The topic has been locked.