Multiple choice with two comments boxes

More
2 months 2 weeks ago #197442 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

Please Log in to join the conversation.

LimeSurvey Partners
More
2 months 2 weeks ago - 2 months 2 weeks ago #197454 by Joffm
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?


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
Last edit: 2 months 2 weeks ago by Joffm.

Please Log in to join the conversation.

More
2 months 2 weeks ago #197459 by startx25
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)

Please Log in to join the conversation.

More
2 months 2 weeks ago #197465 by holch

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.

Please Log in to join the conversation.

More
2 months 2 weeks ago #197467 by Joffm
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


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:

Please Log in to join the conversation.

More
2 months 2 weeks ago #197486 by startx25
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

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now