Check out the LimeSurvey source code on GitHub!

Choice of city

More
5 years 10 months ago #57298 by nozil
Hi,

is it possible to do the following :

in question 1, ask for zip code of city (in france, zip code can be used for more than one city)
in question 2, select the city corresponding to that zip code.

Thanks a lot for your help.

Please Log in to join the conversation.

More
5 years 10 months ago #57299 by Mazi
You can either create X following questions (X = number of ZIP codes) and show them depending on the previous answer by using conditions or adapt this workaround: docs.limesurvey.org/Workarounds%3A+Manip...wers_for_text_inputs


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The following user(s) said Thank You: r_kockelkoren

Please Log in to join the conversation.

More
5 years 10 months ago #57393 by r_kockelkoren
Hi,

I tried to use "method 1". But it doesn't work.
I've copied the jquery files into the template directory en inserted the code into the header of startpage.pstpl. I also copied the the javascript into the source of the text question.
What do I have to use for the ID of the text input question? Is that 25 or 28758X5X25?

Further, when I look at the source code of the (working) demo I don't see the js script. In my own source I do see the code, but that must be wrong (since it is not working).

Please help.

Please Log in to join the conversation.

More
5 years 10 months ago #57414 by Mazi
Please post a link to your test survey so we can have a look.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 10 months ago #57420 by tpartner

What do I have to use for the ID of the text input question? Is that 25 or 28758X5X25?

Just 25 - it is the question ID, not the full SGQA.

Further, when I look at the source code of the (working) demo I don't see the js script...

That's because in the demo I put the JavaScript in template.js but it will work fine if placed in the source of a question text or question help.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 years 10 months ago #57431 by r_kockelkoren
Hi,

I was testing on a xampp server, so I had to install Limesurvey on my webserver first.

Please see:
212.178.134.50/limesurvey/index.php?sid=87973&lang=nl
(only 1 question and this is the one with the cities)

Thanks in advance.

Please Log in to join the conversation.

More
5 years 10 months ago #57434 by DenisChenu
Hello,

You need to put the sate var in one line :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
The following user(s) said Thank You: r_kockelkoren

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form