- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Mandatory comments input if answer equals . ..
- kylekeenan
- Topic Author
- Offline
- New Member
Less
More
6 years 11 months ago #152648
by kylekeenan
Mandatory comments input if answer equals . .. was created by kylekeenan
Hi,
So creating my first Lime Survey survey - i really enjoy the complexity of it. Should meet all of my needs.
I have a comments section after each of my likert scale questions. I want to make the Comments question mandatory if the answer to the previous question is below X.
Currently I am able to have one comment box that shows up always and can be skipped. Which I can't seem to get to hide. Then if the answer to the likert scale question is below X then the mandatory comments box shows up. I'd like to be able to do this with one comments box:
So if answer to question 1 is 7, 6, or 0 then comments can be skipped. If answer to question 1 is 5, 4, 3, 2 or 1 then the comments is mandatory.
If I could hide the first comments box and have either comments box show up based on answer that would be ideal.
Thoughts?
So creating my first Lime Survey survey - i really enjoy the complexity of it. Should meet all of my needs.
I have a comments section after each of my likert scale questions. I want to make the Comments question mandatory if the answer to the previous question is below X.
Currently I am able to have one comment box that shows up always and can be skipped. Which I can't seem to get to hide. Then if the answer to the likert scale question is below X then the mandatory comments box shows up. I'd like to be able to do this with one comments box:
So if answer to question 1 is 7, 6, or 0 then comments can be skipped. If answer to question 1 is 5, 4, 3, 2 or 1 then the comments is mandatory.
If I could hide the first comments box and have either comments box show up based on answer that would be ideal.
Thoughts?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
6 years 11 months ago - 6 years 11 months ago #152662
by tpartner
Assuming question 1 is an array type question with code "Q1" and one sub-question with code SQ001, the relevance for the non-mandatory comments would be:
The relevance for the mandatory comments would be:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Mandatory comments input if answer equals . ..
This should be easy to accomplish with relevance - manual.limesurvey.org/Expression_Manager...ation.2FBranching.29 .If I could hide the first comments box and have either comments box show up based on answer that would be ideal.
Assuming question 1 is an array type question with code "Q1" and one sub-question with code SQ001, the relevance for the non-mandatory comments would be:
Code:
Q1_SQ001 < 1 OR Q1_SQ001 > 5
The relevance for the mandatory comments would be:
Code:
Q1_SQ001 > 0 AND Q1_SQ001 < 6
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 6 years 11 months ago by tpartner.
The topic has been locked.
- kylekeenan
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
6 years 11 months ago #152666
by kylekeenan
Replied by kylekeenan on topic Mandatory comments input if answer equals . ..
Hi, thank you for the feedback. The question is actually a dropdown menu so the comments in another question.
So I need to make that Comments question mandatory based on answers in question 1.
Thanks,
So I need to make that Comments question mandatory based on answers in question 1.
Thanks,
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
6 years 11 months ago #152667
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Mandatory comments input if answer equals . ..
In that case, you just need to change the variable names. Please refer to the manual -
manual.limesurvey.org/Expression_Manager#Access_to_Variables
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.