Welcome to the LimeSurvey Community Forum

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

Merge dropdown menu to radio list option

  • polbarbeoecd95
  • polbarbeoecd95's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 2 weeks ago #229069 by polbarbeoecd95
Merge dropdown menu to radio list option was created by polbarbeoecd95
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.3.17
Own server or LimeSurvey hosting: LimeSurvey
Survey theme/template: Fruity
==================
(Write here your question/remark)

Good afternoon all, I am relatively new to LIME survey and I was wondering if there is any way to include a dropdown menu option if a certain answer from a radio list is selected. 

I tried this workaround although unsuccessfully,  Can I combine List(radio) and List (dropdown) into one question? - LimeSurvey forums

What are the parts of the code that I would need to change to make it work in my template? I am not used at all to Javascript. 

All the best, 

Pol 

 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 weeks ago #229071 by Joffm
Replied by Joffm on topic Merge dropdown menu to radio list option
Hi,
did you import the sample survey included in the link?
I do not see any issue using it in version 5.3.17.
 

What are the parts of the code that I would need to change to make it work in my template? I am not used at all to Javascript. 

Obviously nothing.

But you should attach these questions as lss export here.
So we see better, what you did and why you

tried this workaround although unsuccessfully,

Joffm

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

Please Log in to join the conversation.

  • polbarbeoecd95
  • polbarbeoecd95's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 2 weeks ago #229074 by polbarbeoecd95
Replied by polbarbeoecd95 on topic Merge dropdown menu to radio list option
Thanks for your rapid response, 

What I would like to do is to implement this very code in a different scenario (please find attached the question). If the respondent selects "Yes" then a dropdown menu with country 1, country 2.... will appear. 

Many thanks

 

Please Log in to join the conversation.

  • polbarbeoecd95
  • polbarbeoecd95's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 2 weeks ago #229075 by polbarbeoecd95
Replied by polbarbeoecd95 on topic Merge dropdown menu to radio list option
No I did not import the sample survey included in the link, I used the code in my own question.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 weeks ago - 3 years 2 weeks ago #229078 by Joffm
Replied by Joffm on topic Merge dropdown menu to radio list option
Hi,
we always ask for lss export, neither lsq nor lsg.
Reason: These exports are language sensitive.
So we voluntary helpers have to guess the base language of your survey, create a survey with this hopefully correct language, create a group to be able to import your lsq export.
Furthermore some systemwide settings  that may be important are not included.

So ease our life. Attach a lss export of the relevant questions.
So, copy your survey, remove everything that is not related to your question and export this survey as lss.

Joffm

By the way:
As this solution is based on two questions your lsq export can't cover this.
Or didn't you see that two questions, the radio(list) and the drop-down are involved?

Seeing your image:
Just import the sample and adapt, meaning "change the word "last" to "first" in the script. That's all.
 

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

Please Log in to join the conversation.

  • polbarbeoecd95
  • polbarbeoecd95's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 2 weeks ago #229082 by polbarbeoecd95
Replied by polbarbeoecd95 on topic Merge dropdown menu to radio list option
Thanks for the tips Joffm. I created a copy of the survey, got rid off the irrelevant parts and attached it here as lss. Hope that will make things easier. 

Best, 

Pol

 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 weeks ago - 3 years 2 weeks ago #229085 by Joffm
Replied by Joffm on topic Merge dropdown menu to radio list option
As I wrote

change the word "last" to "first" in the script. That's all.


Is missing in the English version.

And add the "Please, select" text in the missing languages

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 2 weeks ago by Joffm.
The following user(s) said Thank You: polbarbeoecd95

Please Log in to join the conversation.

  • polbarbeoecd95
  • polbarbeoecd95's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 2 weeks ago #229096 by polbarbeoecd95
Replied by polbarbeoecd95 on topic Merge dropdown menu to radio list option
It ended up working! Thank you so much Joffm!

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose