Welcome to the LimeSurvey Community Forum

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

Dropdown based on previous question

  • stefanosiano
  • stefanosiano's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #220071 by stefanosiano
Dropdown based on previous question was created by stefanosiano
Hi everyone, 

I premise that I'm super noob and I don't know how to code in XML so maybe my request can be pretentious based on my skills lol.

I need a double dropdown question, where the second modes of response are based on the answer that the user give to the first question. 
More specifically, I need that my user will select his State (es. California) and, based on his choice, he can select only cities that are in that State (so, L.A., Sacramento, S.F. etc.).

If anyone can help, it would be great! Thanks everyone in advice!
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago - 3 years 9 months ago #220073 by Joffm
Replied by Joffm on topic Dropdown based on previous question
Here is an example.
Italian regions -> province of the region.

You see the structure of the answer options. Beware: The answer options have to be 5 characters laong.
 

File Attachment:

File Name: limesurvey...8126.lss
File Size:60 KB


Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 9 months ago by Joffm.
The topic has been locked.
  • stefanosiano
  • stefanosiano's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #220076 by stefanosiano
Replied by stefanosiano on topic Dropdown based on previous question
Hi Joffm,

that's great and is exactly what I've looking for (I need Italian regions and province). It's possibile to have also province to city file? Or can you explane me how to adapt the file that you send me to this other case?

Thank you so much!
Stefano
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #220083 by Joffm
Replied by Joffm on topic Dropdown based on previous question

I need Italian regions and province

Why didn't you say that before?

This whole solution is based on lfanfoni in the Italian forum.

You may read this
[url] forums.limesurvey.org/forum/italian-foru...3-lista-reg-prov-com [/url]

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • stefanosiano
  • stefanosiano's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago - 3 years 9 months ago #220087 by stefanosiano
Replied by stefanosiano on topic Dropdown based on previous question
I didn't say that before because I already tried it. When I try to import the .lsq file ("province_comuni_it_ls3.25.21"), it appears a white page with this: "This is not a valid LimeSurvey question structure XML file.". I'm currently on Limesurvey 3.22 version.

Do you know how to fix this or where I'm wrong?

Stefano
Last edit: 3 years 9 months ago by stefanosiano.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #220104 by Joffm
Replied by Joffm on topic Dropdown based on previous question
Hi, I do not see an issue importing the github lss code.
You have to copy the xml code into an text editor and save it as *.lss. Then import.

But the main thing I wanted to point out:
As lfanfoni is the "creator" of this, you should better ask him in the Italian forum.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • stefanosiano
  • stefanosiano's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #220106 by stefanosiano
Replied by stefanosiano on topic Dropdown based on previous question
Hi Joffm,
I've tried to talk with him, but he said that he unfortunately can't help me. BTW, writing a post inside italian forum can be helpful, maybe someone had my same problems and they fixed it.

Can you explain me how to save the code as *.lss? I've tried to copy-paste code inside Notepad and rename the file in "test.lss", unsuccessfully.

Stefano
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose