- Posts: 7
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Adding 2 others field for multiple choice question
- Sabrina2017
- Topic Author
- Offline
- New Member
Less
More
7 years 3 months ago #146508
by Sabrina2017
Adding 2 others field for multiple choice question was created by Sabrina2017
Hi,
I have two requests :
1- Adding 2 others field for multiple choice question (please see attachement *query 1)
2- Layout for response with two different language and checkbox imput in center(please see attachement *query 2)
Thank You
I have two requests :
1- Adding 2 others field for multiple choice question (please see attachement *query 1)
2- Layout for response with two different language and checkbox imput in center(please see attachement *query 2)
Thank You
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
7 years 3 months ago #146512
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 Adding 2 others field for multiple choice question
What LimeSurvey version and template?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- Sabrina2017
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
7 years 3 months ago #146513
by Sabrina2017
Replied by Sabrina2017 on topic Adding 2 others field for multiple choice question
Version 2.57.1+161205
default template
default template
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
7 years 3 months ago - 7 years 3 months ago #146532
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 Adding 2 others field for multiple choice question
1) Use a
Multiple choice with comments
type question and hide some of the text inputs with JavaScript or CSS. See this post -
www.limesurvey.org/forum/can-i-do-this-w...oice-question#146117
2) You will have to manipulate the labels with CSS and/or JavaScript. I'll have to give a little thought as how to best do that.
2) You will have to manipulate the labels with CSS and/or JavaScript. I'll have to give a little thought as how to best do that.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 7 years 3 months ago by tpartner.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
7 years 3 months ago - 7 years 3 months ago #146540
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 Adding 2 others field for multiple choice question
I think for #2, in order to maintain vertical alignment, you will need to insert a table and move the answer elements into table rows.
Wrap the French and English portions of the sub-question labels in <span> elements with classes "label-fr" and "label-en"
Add this script to the question text:
Sample survey attached:
Wrap the French and English portions of the sub-question labels in <span> elements with classes "label-fr" and "label-en"
Add this script to the question text:
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // Identify this question var thisQuestion = $('#question{QID}'); // Insert a table $('.subquestion-list', thisQuestion).after('<table class="bilingual-list" />'); // Insert table rows $('.question-item', thisQuestion).each(function(i) { $('.bilingual-list', thisQuestion).append('<tr class="inserted-row-'+i+'">\ <td class="inserted-label-fr" />\ <td class="inserted-answer" />\ <td class="inserted-label-en" />\ </tr>'); $('.inserted-row-'+i+' .inserted-answer', thisQuestion).append(this); $('.inserted-row-'+i+' .inserted-label-fr', thisQuestion).append($('.label-fr', this)); $('.inserted-row-'+i+' .inserted-label-en', thisQuestion).append($('.label-en', this)); }); // Some styling $('table.bilingual-list', thisQuestion).css({ 'width': 'auto' }); $('table.bilingual-list td', thisQuestion).css({ 'padding-top': '5px', 'padding-bottom': '5px' }); $('td.inserted-answer .question-item', thisQuestion).css({ 'margin': '0', 'padding-left': '40px' }); $('td.inserted-answer .label-clickable', thisQuestion).css({ 'display': 'none' }); }); </script>
Sample survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last edit: 7 years 3 months ago by tpartner.
The topic has been locked.