I want make a survey with the mandatory comment depends on the selected answer. I've setting the question (Q1) as mandatory and select the question type as "single choice question --> List with comment". I set the answer just 2 answers, "YES" or" NO". I want the conditions like this :
-. If I choose the answer is "YES", so I must fill the comment box. In the other side, if I choose "NO" answer, the comment box is not activated (I must not fill the comment box)
I have try to input "!is_empty(Q1_comment)" in "question validation equation" field, but I still could fill the comment box when I choose "NO" answer.
Appreciate your help, because it's my first time to use limesurvey.
Hi,
this is not the best type of question to do this.
Here the comment is a comment on the question in general, not further explanations on specific answers.
You ought to use a different design.
1. Your "Yes/No" question
2. A question of type "short/long text" which is only displayed (by relevance equation) if "Yes" was selected.
But, of course, if you stay to your "list(radio) with comment" you have to extend the validation.
What are the conditions?
One of these has to be TRUE.
1. Q1 answered "Yes" and Q1_comment is not empty
2. Q1 answered "No" and Q1_comment is empty
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
thank Jeff for your advice..
How to write (command line) the second option of your advice in survey?
1. Q1 answered "Yes" and Q1_comment is not empty
2. Q1 answered "No" and Q1_comment is empty
!is_empty(Q1_comment) mean ONLY Q1_comment mus not be empty .
Then
(Q1.NAOK == "Y" AND !is_empty(Q1_comment.NAOK))
OR
(Q1.NAOK != "Y")
I let you fix the second line.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.