Welcome to the LimeSurvey Community Forum

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

Dynamically Changing Number of Questions

  • vevasudevan
  • vevasudevan's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #177741 by vevasudevan
Dynamically Changing Number of Questions was created by vevasudevan
I have a question about changing the number of questions based on a users input. Specifically, say a user answers 5 to a question, how would i then display 5 input boxes for the user to enter their input into.

Example:

Q How many cars do you have?

User enters 2

What is the brand of car 1?
What is the brand of car 2?



Example 2:
Q How many cars do you have?

User enters 4

What is the brand of car 1?
What is the brand of car 2?
What is the brand of car 3?
What is the brand of car 4?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #177743 by tpartner
Replied by tpartner on topic Dynamically Changing Number of Questions
Use a multiple-short text with sub-question relevance.

- manual.limesurvey.org/Adding_answers_or_...fic_for_subquestions

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • vevasudevan
  • vevasudevan's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 4 months ago #177744 by vevasudevan
Replied by vevasudevan on topic Dynamically Changing Number of Questions
Yep, i've tried that but the real functionality I was wondering about was if i could change the amount of sub questions that was asked based on the user input. For example if a user enters 5 then 5 sub questions would be generated and if they say 2 then two sub questions would be generated.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #177767 by holch
Replied by holch on topic Dynamically Changing Number of Questions
Exactly as Tpartner describes. You need to create a certain number of subquestions and hide/show them via subquestion relevance, based on the number of questions they enter.

There is no way to dynamically add subquestions. You need to create them first and hide/show them according to need.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose