Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Recommendation on handling very long multiple choice list

  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
5 years 2 weeks ago #190012 by blocka
I have a multiple choice question that lists about 60 answer options.

Instead of a long list with 3 columns displaying all the options, I was hoping to be able to set up a list box that allows for multiple selections (ideally with ability to type into the box to find matches), like this:

www.jqueryscript.net/demo/Searchable-Mul...ect-jQuery-Dropdown/

Is this possible in LS 3.19.1+191009 ?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 2 weeks ago - 5 years 2 weeks ago #190013 by Joffm
Please, have a look here
www.limesurvey.org/forum/can-i-do-this-w...-select-boxes#184509



And with search


Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 5 years 2 weeks ago by Joffm.
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
5 years 2 weeks ago #190014 by blocka
I had indeed come across that, which is awesome, except for my data analysis, I have to have the responses in the multiple choice question format, and not a text field type...

So I'm hoping for a solution that uses Multiple Choice question type....
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 2 weeks ago #190066 by tpartner
I think this is a good candidate for a custom question theme. I'll see what I can put together over the weekend.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
5 years 2 weeks ago #190067 by blocka
This would be an awesome feature!
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 2 weeks ago #190068 by Joffm
Yes, it would.
But in my opinion LS shouldn't get lost in fulfilling each single wish, but instead concentrate on the real important things: Developping and adding features which are requested for a long time, like loops or dynamic lists or a better system to group questions on a page.

Your problem can be easily solved by a few lines added to the syntax file of SPSS.
1. restructure to categorical:
STRING #tmpstr(A200).
COMPUTE #tmpstr = Q1.
COMPUTE #tmpstr = CONCAT(#tmpstr,",").
* here max number of items, example 20
VECTOR Q2(20,f4).
LOOP #i = 1 to 20.
- COMPUTE #dash = CHAR.INDEX(#tmpstr,",").
- COMPUTE Q2(#i) = NUMBER(CHAR.SUBSTR(#tmpstr,1,#dash-1),f10).
- COMPUTE #tmpstr = CHAR.SUBSTR(#tmpstr,#dash+1).
END LOOP.
EXECUTE.



2. to binary
STRING #tmpstr(A200).
COMPUTE #tmpstr = Q1.
COMPUTE #tmpstr = CONCAT(#tmpstr,",").
* here max number of items, example 20
VECTOR Q2_(20,f2).
LOOP #i = 1 to 20.
- COMPUTE #dash = CHAR.INDEX(#tmpstr,",").
- COMPUTE #w = NUMBER(CHAR.SUBSTR(#tmpstr,1,#dash-1),f10).
- COMPUTE Q2_(#w) =1.
- COMPUTE #tmpstr = CHAR.SUBSTR(#tmpstr,#dash+1).
END LOOP.
EXECUTE.



Or an EXCEL macro with the same logic.

But of course, if Tony will create a question theme for it, just better.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
5 years 2 weeks ago #190069 by blocka
Totally hear you -- always a compromise to be made with limited resources. Your solution is awesome -- as long as one is planning on exporting data to another app to do analysis.

A question theme is sweet for cases where the only analysis to be done is in the basic stats reports.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 2 weeks ago #190072 by tpartner

But in my opinion LS shouldn't get lost in fulfilling each single wish, but instead concentrate on the real important things: Developping and adding features which are requested for a long time, like loops or dynamic lists or a better system to group questions on a page.

I am not a core developer. In my free time, I concentrate on what I have time for and what I believe will benefit the community.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 2 weeks ago #190079 by Joffm
@tpartner
I know that and I did not address you.
I just wanted to say what I as a market researcher would like to see in next versions of LS.
And of course I am used to restructure exported data from very different sources in very different formats to our needs.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
5 years 2 weeks ago #190086 by DenisChenu
Issue with a lot of subquestions is the number of columns too.

I made this plugin gitlab.com/SondagesPro/QuestionSettingsType/selectQuestionBy

1. A long text question
2. And hidden single choice question

Long text question show dropdow using select2 package

Name is selectQuestionBy because i want to have : label or other survey too …


Have a multiple choice system with a tag helper can be great too :) (and can be done in QuestionTheme (in theory))

I have filterBigListSurvey to add a filter single choce biglist
Surely not 3.X compatible …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 2 weeks ago - 5 years 2 weeks ago #190090 by tpartner
Yes, I understand the risk incurred by LS creating a column for every multiple-choice sub-question but I think this still may be useful in many cases.

I have developed a custom question theme that uses the Select2 component to insert a searchable select element to choose options of a LimeSurvey multiple-choice type question.

The LS check-boxes are hidden. When an item is selected in the Select2 element, the corresponding check-box is checked and Expression Manager is fired.

Download the theme here - github.com/tpartner/LimeSurvey-Multiple-Choice-Dropdown


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 2 weeks ago by tpartner.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
5 years 1 week ago #190098 by blocka
@tpartner This is awesome! I just installed and tested and it works wonderfully. Thanks so much for taking the time to create this.

This is the first custom question theme I've used (or even seen)... Are there other custom question themes available anywhere?
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose