Welcome to the LimeSurvey Community Forum

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

auto code

  • matrukinkar
  • matrukinkar's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 6 days ago #269796 by matrukinkar
auto code was created by matrukinkar
[object Object] Please help us help you and fill where relevant:
LimeSurvey version: 
Own server or LimeSurvey Cloud:+6
Survey theme/template:
==================
Hi,
I have a single choice(Q1) question type. I need to display  2nd question(Q2) when 1 to 5 options are selected in the Q1 and display Q3 when option 6 to 10 options are selected in Q1.

regards,

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 week 6 days ago #269800 by holch
Replied by holch on topic auto code
Please do not double (or in your case triple) post. As a new user your post needs to be approved by a moderator first. I will delete the other 2 posts in the queue.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 week 6 days ago #269801 by holch
Replied by holch on topic auto code
You need to either use conditions or relevance equation.

Conditions allow you to click things together, but it is outdated and very limited and takes longer.

I highly recommend to have a look at the expression manager section of the manual. Looks overwhelming at the beginning, but it is actually quite simple. And totally worth it. Because you increase the possibilities you have with Limesurvey immensely. If you can write Excel formulas, you can write Expression Script.

In your case for example, you could write something like this into the "relevance equation" of Q2:
Code:
Q1 <6

What does this mean? I means Q2 is shown if Q1 is smaller than six (so 1-5).

For Q3 you can use something like:
Code:
Q1>5

But don't just copy and paste this into your survey, but have a look at the manual about expression manager, because there is o much more you can do with expression manager/script.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose