- Posts: 107
- Thank you received: 4
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Filter dropdown options
- Matadeleo
- Topic Author
- Offline
- Premium Member
Less
More
4 years 9 months ago #186084
by Matadeleo
Filter dropdown options was created by Matadeleo
Hi guys,
I am trying to filter answer options based on an answer given in a previous question. The dream solution would be to have 3 dropdowns to select your current town.
E.g.
Q1: Select region -> Q2: Select county -> Q3: Select town/city
----
Q2 would only show counties for the region selected in Q1.
Q3 would only show towns/cities in the county selected at Q2.
Is this possible with LimeSurvey? I considered some options like attempting to write the JavaScript to remove answer options but then if the user changes his answer those removed answer options would not be re-added..
I am trying to filter answer options based on an answer given in a previous question. The dream solution would be to have 3 dropdowns to select your current town.
E.g.
Q1: Select region -> Q2: Select county -> Q3: Select town/city
----
Q2 would only show counties for the region selected in Q1.
Q3 would only show towns/cities in the county selected at Q2.
Is this possible with LimeSurvey? I considered some options like attempting to write the JavaScript to remove answer options but then if the user changes his answer those removed answer options would not be re-added..
Attachments:
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13624
- Thank you received: 2490
4 years 9 months ago - 4 years 9 months ago #186101
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Filter dropdown options
For town, you can get inspiration with
cpVille
Else you can try gitlab.com/SondagesPro/QuestionSettingsType/autoComplete (with show as dropdown option) but it don't work good with big list.
Else you can try gitlab.com/SondagesPro/QuestionSettingsType/autoComplete (with show as dropdown option) but it don't work good with big list.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 4 years 9 months ago by DenisChenu.
The topic has been locked.
- Matadeleo
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 107
- Thank you received: 4
4 years 9 months ago #186121
by Matadeleo
Replied by Matadeleo on topic Filter dropdown options
Would you post your LSS file for the cpVille survey?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13624
- Thank you received: 2490
4 years 9 months ago #186122
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Filter dropdown options
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- Matadeleo
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 107
- Thank you received: 4
4 years 9 months ago - 4 years 9 months ago #186123
by Matadeleo
Replied by Matadeleo on topic Filter dropdown options
I am interested to know how you managed the auto-fill into your 2 disabled fields. I could achieve my goal by having the user search for town/city and then automatically fill Region and County.
I don't think the documentation covered this (I think, there was lots of French )
I don't think the documentation covered this (I think, there was lots of French )
Last edit: 4 years 9 months ago by Matadeleo.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13624
- Thank you received: 2490
4 years 9 months ago #186128
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Filter dropdown options
See :
gitlab.com/SondagesPro/QuestionSettingsT...setup-and-activation
Currently : it's done for French town, but having another DB for all world town can surely be done.
Then adding 2 columns :
1. country
2. region
3. …
I already have a client with menage column + department
Currently : it's done for French town, but having another DB for all world town can surely be done.
Then adding 2 columns :
1. country
2. region
3. …
I already have a client with menage column + department
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- Matadeleo
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 107
- Thank you received: 4
4 years 9 months ago - 4 years 9 months ago #186131
by Matadeleo
Replied by Matadeleo on topic Filter dropdown options
Can I ask how you are accessing the plugin settings? I can only make this work in 'short free text' rather than 'multiple short text'. I don't see any option to configure the settings for plugin. (The actual plugin settings menu, not the autoComplete tab under question settings)
Last edit: 4 years 9 months ago by Matadeleo.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13624
- Thank you received: 2490
4 years 9 months ago #186137
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Filter dropdown options
cpVille have global plugin settings
autoComplete didn't have global plugin setting
autoComplete didn't have global plugin setting
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.