Check out the LimeSurvey source code on GitHub!

Multiple Choice W/ Required Comment

3 years 9 months ago #96174 by DoctorT
How can I require that a comment be entered in a Multiple Choice W/ Comment question?

Or is there an alternative type of question that I may use?

Thank you!

Doctor T

Please Log in to join the conversation.

3 years 8 months ago #96222 by DenisChenu

Think tou can use Expression Manager[1] in question validation equation [2]

You have to use empty function with QCODE_SQ001comment :

example for SQ1 :
(empty(QCODE_SQ1) or !empty(QCODE_SQ001comment))
If i don't make error ;)


Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

3 years 8 months ago #96244 by benmok
Sorry i am quite new at this.

What is the question name in your example? Is it SQ1? If so then shouldn't it be !empty(QCODE_SQ1comment)? Is QCODE a system syntax?

And shouldn't the validation be the other way around and also using AND instead of OR?
ie (!empty(QCODE_SQ1) AND empty(QCODE_SQ001comment))

I have read other posting that they use is_empty and !is_empty.

I have tried all variations in my validation codes and nothing works.


Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form