- Posts: 14
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Multiple choice with two comments boxes
- startx25
- Topic Author
- Offline
- New Member
Less
More
4 years 1 week ago #197442
by startx25
Multiple choice with two comments boxes was created by startx25
Hi all,
I want to use two comments (or three) boxes in multiple choicie question.
I have read all documentation and can't find some help.
how can i use multiple choice with comments question, but with two comments texte boxes
thank you for any help
I want to use two comments (or three) boxes in multiple choicie question.
I have read all documentation and can't find some help.
how can i use multiple choice with comments question, but with two comments texte boxes
thank you for any help
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12943
- Thank you received: 3979
4 years 1 week ago - 4 years 1 week ago #197454
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Multiple choice with two comments boxes
You might use a different question type, e.g.array(text).
You may insert a dropdown in the first column with "Yes/No" and two or more "normal" text inputs.
Joffm
Or do you want to hide the comment boxes except two or three?
You may insert a dropdown in the first column with "Yes/No" and two or more "normal" text inputs.
Joffm
Or do you want to hide the comment boxes except two or three?
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 1 week ago by Joffm.
The topic has been locked.
- startx25
- Topic Author
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 0
4 years 1 week ago #197459
by startx25
Replied by startx25 on topic Multiple choice with two comments boxes
thanks for you response.
I don't want a drop list, juste multichoice with two comments.
Multichoice dont use an array (it use div tags)
I don't want a drop list, juste multichoice with two comments.
Multichoice dont use an array (it use div tags)
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11661
- Thank you received: 2742
4 years 1 week ago #197465
by holch
If you insist on Multiple Choice, then it will be far more complicated, which is why Joffm has suggested a dropdown with "yes/no" which basically has the same effect as a multipe choice.
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 Multiple choice with two comments boxes
Multichoice dont use an array (it use div tags)
If you insist on Multiple Choice, then it will be far more complicated, which is why Joffm has suggested a dropdown with "yes/no" which basically has the same effect as a multipe choice.
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.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12943
- Thank you received: 3979
4 years 1 week ago #197467
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Multiple choice with two comments boxes
Though I do not see what is the difference for the respondent
of course, it's up to you.
Maybe someone here provides a different solution.
Joffm
of course, it's up to you.
Maybe someone here provides a different solution.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- startx25
- Topic Author
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 0
4 years 6 days ago #197486
by startx25
Replied by startx25 on topic Multiple choice with two comments boxes
Hi jhon,
thank you.
finaly i found a javascript that replace a text box to a checkbox in textarray question :
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
// Identify this question
var thisQuestion = $('#question{QID}');
// Assign column-specific classes
$('table.subquestion-list tr', thisQuestion).each(function(i) {
$('> *:gt(0)', this).each(function(i){
$(this).addClass('column-'+(i+1));
$(this).attr('data-column', i+1);
});
});
// Hide the text inputs in columns 1 and 4
$('.column-1 input[type="text"]', thisQuestion).hide();
// Insert the checkboxes into column 1
$('.answer-item.column-1').append('<input class="checkbox inserted-checkbox" type="checkbox" />');
// Initial checkbox states (if the question has already been answered)
$('.answer-item.column-1 input[type="text"]').each(function(i){
if($.trim($(this).val()) == 'Y') {
$(this).closest('td').find('.inserted-checkbox').attr('checked', true);
}
});
// Listener on the checkboxes (insert "Y" into hidden text input when checked)
$('.inserted-checkbox').change(function() {
if($(this).is(':checked')) {
$(this).closest('td').find('input[type="text"]').val('Y');
}
else {
$(this).closest('td').find('input[type="text"]').val('');
}
});
});
</script>
it's work gread, now just looking to center the checkbox
thank you.
finaly i found a javascript that replace a text box to a checkbox in textarray question :
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
// Identify this question
var thisQuestion = $('#question{QID}');
// Assign column-specific classes
$('table.subquestion-list tr', thisQuestion).each(function(i) {
$('> *:gt(0)', this).each(function(i){
$(this).addClass('column-'+(i+1));
$(this).attr('data-column', i+1);
});
});
// Hide the text inputs in columns 1 and 4
$('.column-1 input[type="text"]', thisQuestion).hide();
// Insert the checkboxes into column 1
$('.answer-item.column-1').append('<input class="checkbox inserted-checkbox" type="checkbox" />');
// Initial checkbox states (if the question has already been answered)
$('.answer-item.column-1 input[type="text"]').each(function(i){
if($.trim($(this).val()) == 'Y') {
$(this).closest('td').find('.inserted-checkbox').attr('checked', true);
}
});
// Listener on the checkboxes (insert "Y" into hidden text input when checked)
$('.inserted-checkbox').change(function() {
if($(this).is(':checked')) {
$(this).closest('td').find('input[type="text"]').val('Y');
}
else {
$(this).closest('td').find('input[type="text"]').val('');
}
});
});
</script>
it's work gread, now just looking to center the checkbox
The topic has been locked.