How can I make the comment in List with comment mandatory if

More
11 months 3 weeks ago #217830 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?

File Attachment:

File Name: survey_385354.lss
File Size:19 KB
Attachments:

Please Log in to join the conversation.

More
11 months 3 weeks ago #217832 by tpartner
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.

Please Log in to join the conversation.

More
11 months 3 weeks ago #217833 by blocka
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.

Please Log in to join the conversation.

More
11 months 3 weeks ago #217838 by tpartner
On the same page?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
11 months 3 weeks ago #217849 by holch
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.

Please Log in to join the conversation.

More
11 months 2 weeks ago #217870 by blocka
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?

Please Log in to join the conversation.

More
11 months 2 weeks ago #217877 by holch
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.

Please Log in to join the conversation.

More
11 months 2 weeks ago #217891 by tpartner
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.

Please Log in to join the conversation.

More
11 months 2 weeks ago #217893 by holch

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.

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.

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.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now