- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Creating a goup with questions or only questions at runtime
- lucianv
- Topic Author
- Offline
- New Member
Less
More
6 months 5 days ago #251384
by lucianv
Creating a goup with questions or only questions at runtime was created by lucianv
Please help us help you and fill where relevant:
Your LimeSurvey version: [6.0]
Own server or LimeSurvey hosting: own
Survey theme/template:
==================
Hello everybody,
I have two array questions looking like below:
Q1. Do you prefer your food Hot Medium/Hot Cold
Food A o o o
Food B o o o
Food C o o o
Q2. Do you prefer your drink Hot Medium/Hot Cold
Drink X o o o
Food Y o o o
Food Z o o o
Both questions are mandatory to be answered.
Based on the answers to these two questions, I need to generate a number of text questions dynamically, only for the Hot and Cold answers. For example.
Q3. I would pay for my Food A and my Drink X .....
If a respondent selects Medium/Hot in both questions Q1 and Q2, then I do not have to generate any new text question at all.
If a respondent select Hot or Cold for question Q1 and only Medium/Hot for question Q2, then I will generate only questions based on the Q1 answers.There may be 3 questions, 2 questions, or 1 question depending on the selection.
....and so on with the logic.
The maximum number of new generated text questions could be: AX, AY, AZ, BX, BY, BZ, CX, CY, CZ.
Is there a way in Limesurvey to dynamically create questions as I need?
Something along the line: if( <<condition is met in previous answer>>) then <<create new text question>>
The example above is just a simplification. In reality I will have three array questions with 6 items each, so creating a fix number of combinations beforehand will not be feasible.
Thank you for your answer.
Your LimeSurvey version: [6.0]
Own server or LimeSurvey hosting: own
Survey theme/template:
==================
Hello everybody,
I have two array questions looking like below:
Q1. Do you prefer your food Hot Medium/Hot Cold
Food A o o o
Food B o o o
Food C o o o
Q2. Do you prefer your drink Hot Medium/Hot Cold
Drink X o o o
Food Y o o o
Food Z o o o
Both questions are mandatory to be answered.
Based on the answers to these two questions, I need to generate a number of text questions dynamically, only for the Hot and Cold answers. For example.
Q3. I would pay for my Food A and my Drink X .....
If a respondent selects Medium/Hot in both questions Q1 and Q2, then I do not have to generate any new text question at all.
If a respondent select Hot or Cold for question Q1 and only Medium/Hot for question Q2, then I will generate only questions based on the Q1 answers.There may be 3 questions, 2 questions, or 1 question depending on the selection.
....and so on with the logic.
The maximum number of new generated text questions could be: AX, AY, AZ, BX, BY, BZ, CX, CY, CZ.
Is there a way in Limesurvey to dynamically create questions as I need?
Something along the line: if( <<condition is met in previous answer>>) then <<create new text question>>
The example above is just a simplification. In reality I will have three array questions with 6 items each, so creating a fix number of combinations beforehand will not be feasible.
Thank you for your answer.
Please Log in to join the conversation.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
6 months 5 days ago #251386
by jelo
You need to create the max amount of text questions and show/hide them depending on the answers of the previous question.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Creating a goup with questions or only questions at runtime
No. When you activate a survey the structure in the database table is fixed.Is there a way in Limesurvey to dynamically create questions as I need?
You need to create the max amount of text questions and show/hide them depending on the answers of the previous question.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Please Log in to join the conversation.