- Posts: 409
- Thank you received: 34
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How can I make the comment in List with comment mandatory if
- blocka
- Topic Author
- Offline
- Platinum Member
Less
More
2 years 9 months ago #217830
by blocka
How can I make the comment in List with comment mandatory if was created by blocka
I just need a nudge in the right direction!
I have a list with comment question where if the answer is No, I want to make the comment mandatory, else comment isn't mandatory.
The question is like:
Do you want to continue? Yes | No
And I figured I could use a question validation equation to force comment mandatory if the answer is No, like this:
Question validation equation is ((!is_empty(self.sq_comment) AND Q1=="A2")) OR (Q1=="A1")
But if I select "Yes" (Q1=="A1") I am still told I cannot submit the question.
What might I be doing wrong?
I have a list with comment question where if the answer is No, I want to make the comment mandatory, else comment isn't mandatory.
The question is like:
Do you want to continue? Yes | No
And I figured I could use a question validation equation to force comment mandatory if the answer is No, like this:
Question validation equation is ((!is_empty(self.sq_comment) AND Q1=="A2")) OR (Q1=="A1")
But if I select "Yes" (Q1=="A1") I am still told I cannot submit the question.
What might I be doing wrong?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
2 years 9 months ago #217832
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 How can I make the comment in List with comment mandatory if
Why not add a following long-text question shown via relevance?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- blocka
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 409
- Thank you received: 34
2 years 9 months ago #217833
by blocka
Replied by blocka on topic How can I make the comment in List with comment mandatory if
Usually, I would -- but in this case, the list with comment question is used in a quota to early terminate the survey, so a following question won't be shown if the response is No, because the survey will terminate before the text question is shown.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
2 years 9 months ago #217838
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 How can I make the comment in List with comment mandatory if
On the same page?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
2 years 9 months ago #217849
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic How can I make the comment in List with comment mandatory if
Besides the suggestion of Tpartner, you could put the screenout a little later via equation question, to avoid your issue.
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.
- blocka
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 409
- Thank you received: 34
2 years 9 months ago #217870
by blocka
Replied by blocka on topic How can I make the comment in List with comment mandatory if
Right, so basically I could use equation question to set the value of a hidden Yes/No (eg: code=QuitNow) type question to Yes/No based on the response to Q1, and use QuitNow with quota, correct?
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
2 years 9 months ago #217877
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic How can I make the comment in List with comment mandatory if
No, depending on your version of Limesurvey, you could use the equation directly for your zero quota, no need to set another question type anymore, afaik.
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.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
2 years 9 months ago #217891
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 How can I make the comment in List with comment mandatory if
I don't see the need for an equation question. I have tested my solution and the value in the screen-out radio and following text question are saved after a screen-out on the first page.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
2 years 9 months ago #217893
by holch
If you use question by question, then the additional question would not be shown if the zero quota is on the first question. Which is why I mentioned the option of the equation question after these two questions. Just an alternative.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic How can I make the comment in List with comment mandatory if
I agree, I don't see why it should not work, if you use group by group display with both questions on the same page.I don't see the need for an equation question. I have tested my solution and the value in the screen-out radio and following text question are saved after a screen-out on the first page.
If you use question by question, then the additional question would not be shown if the zero quota is on the first question. Which is why I mentioned the option of the equation question after these two questions. Just an alternative.
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.