Welcome to the LimeSurvey Community Forum

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

Cascading Bootstrap Dropdown

  • adilar39
  • adilar39's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 months 2 weeks ago #265865 by adilar39
Cascading Bootstrap Dropdown was created by adilar39
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.5.15
Own server or LimeSurvey hosting: own
Survey theme/template: fruity_extended
==================
Hello everyone.

I've made a survey before using filtered dropdown like shown in here:
forums.limesurvey.org/forum/design-issue...st-dropdown-question

It works fine with few choices. But now I'm making new survey with hundred of choices and need to be filtered like above. To simplify searching, I want it so respondent can search the choices. Select Filter Javascript that used above is not compatible to Bootstrap Dropdown that have search function inside.

Is there any way to apply filtered dropdown in Bootstrap Dropdown? Or can search function applied in normal dropdown?

Thanks in advance.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 2 weeks ago #265869 by tpartner
Replied by tpartner on topic Cascading Bootstrap Dropdown
Searchable dropdown question theme - github.com/tpartner/LimeSurvey-Searchable-Dropdown-6x

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

Please Log in to join the conversation.

  • adilar39
  • adilar39's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 months 2 weeks ago - 5 months 2 weeks ago #265878 by adilar39
Replied by adilar39 on topic Cascading Bootstrap Dropdown
I've tried install that question theme, but it shown two dropdown box in the second question, with the first box is filtered and the second box is a normal searchable dropdown that's not filtered based on the first question.
And in my understanding, the way Select Filter JS works is it read the first character of answer code in first question as a filter for the second question with same character at the answer code. But this mean that answer code "A" and "AA" is not different. Can we make so that it read at least 2 or 3 characters as a filter for the second question?
Last edit: 5 months 2 weeks ago by adilar39.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 2 weeks ago #265879 by Joffm
Replied by Joffm on topic Cascading Bootstrap Dropdown
Hi,
if there are really many, many items there is another approach.
With the library "easy-autocomplete"
Here the original sample of @tpartner
[url] forums.limesurvey.org/forum/can-i-do-thi...tions-filters#226402 [/url]

Here I adapted (only two levels, all 2056 cities of Germany)



Joffm

BTW:
In your provided lss, which javascript did you exactly use?
It is in your "custom.js", but not in the export.
 

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

Please Log in to join the conversation.

  • adilar39
  • adilar39's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 months 2 weeks ago - 5 months 2 weeks ago #265880 by adilar39
Replied by adilar39 on topic Cascading Bootstrap Dropdown
That's what I'm looking for. Unfortunately, it looks like the easy autocomplete JS website is down, so the method is not working. I've tried change it to https and it's still not working. Is there anyway to see that Javascript? And if I want to used it in my survey, should I just copied it inside custom.js in my theme like selectFilterByCode?


The Javascript that I used is selectFilterByCode, copied into custom.js in my theme.
Last edit: 5 months 2 weeks ago by adilar39.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 months 2 weeks ago #265881 by Joffm
Replied by Joffm on topic Cascading Bootstrap Dropdown

it looks like the easy autocomplete JS website is down

I do not see this
[url] github.com/pawelczak/EasyAutocomplete [/url]

and the cdn where you can download the js and css 
[url] cdnjs.com/libraries/easy-autocomplete [/url]

And something more
[url] shift.digital/insights/jquery-easyautoco...tion-and-usage-guide [/url]

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: adilar39

Please Log in to join the conversation.

  • adilar39
  • adilar39's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 months 1 week ago #265896 by adilar39
Replied by adilar39 on topic Cascading Bootstrap Dropdown
Thank you so much Joffm, now it works.
Because this is a multiple short text question, participant can type freely and not chose answer shown in dropdown form. Can we limit so that the answer must be chosen from the list only?

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
5 months 1 week ago #265906 by DenisChenu
Replied by DenisChenu on topic Cascading Bootstrap Dropdown

Hi,
if there are really many, many items there is another approach.
 
I use this one now : gitlab.com/SondagesPro/QuestionSettingsT...tQuestionByResponses
The test survey use these datasets : github.com/datasets/world-cities

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.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose