Check out the LimeSurvey source code on GitHub!

create a new question type

More
5 years 2 months ago #71195 by AileenSH
Merry Christmas and Happy New Year!

I need to have a question type where:

1. multiple choices and multiple comments
2. once the question is answered, only ticked check boxes and comments typed in by the user can be seen

For example:
Q1. Who are your favourite teachers in this list?
A. Steven Black B. Susan King C. David White D. No one in the list (in the type of check box)(multiple options can be ticked at the same time) (if D is ticked, other options are disabled)
Please add more names
First Name Surname
textbox1 textbox2


Also, the array in comments can be expandable. Once the user answers this question, I would like to hide the check boxes un-ticked and only display the ticked check boxes and entries in the comment field, i.e. text box1 and text box2.

My coding work is in the attachment. It hasn't done appropriately. I am wondering whether this problem can be fixed in a better way. Thank you.

Please Log in to join the conversation.

More
5 years 2 months ago #71197 by tpartner
You should be able to do this with several questions:

A multiple choice using the exclude_all_others setting .

Several following multiple-text questions each shown conditionally when the previous question is answered.

As for hiding the checkboxes, I don't understand why or when you would want to do that. Wouldn't that prevent a respondent from correcting a wrong selection?

Also there is no attachment...

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: AileenSH

Please Log in to join the conversation.

More
5 years 2 months ago #71204 by AileenSH

File Attachment:

File Name: question.txt
File Size:4 KB
Attachments:

Please Log in to join the conversation.

More
5 years 2 months ago #71220 by tpartner
For the checkbox question you can use the exclude_all_others setting.

For the Variable Length Array there is a workaround here - docs.limesurvey.org/Workarounds%3A+Manip...exible_Text_question

I'm still not clear on what you want to do with the textarea. Your script appears to attempt to create a table of all checked responses but does nothing with the table. (you can't load a table into a textarea)

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: AileenSH

Please Log in to join the conversation.

More
5 years 1 month ago #71233 by AileenSH
Thank you for your reply. It's very useful. Regarding the issue that users cannot change the answer, yes, it's designed to not allow users to go back to change the answer for a few questions. Is it possible in LimeSurvey? Thank you.

Please Log in to join the conversation.

More
5 years 1 month ago #71850 by Mazi
you can simply not display the back button so they cannot change answers.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form