Validation Equation Only if question is answered

Plus d'informations
il y a 1 mois 2 jours #159721 par AdelAli
AdelAli a créé le sujet : Validation Equation Only if question is answered
Hello,,

I have a list with comment question (Q1) .. it a mandatory question.. I wrote a validation equation: !is_empty(Q1_comment)
to make the comment mandatory too and it working fine..

the problem is there is a red box around the question from the begining.. which means the validation is running already..
I just want this valiation to be run only if form is submitted or the question is answered (a choice is choosen) successfully

senario:

1. if question is not answerd the mandatory validation will be run, so need to validate the comment too.
2. if question is answered (a choice is choosen).. then check for the comment if its empty show error
3. if question is answered and comment is not empty.. validation pass

Connexion pour participer à la conversation.

Plus d'informations
il y a 1 mois 2 jours #159722 par Joffm
Joffm a répondu au sujet : Validation Equation Only if question is answered
Hello,

Of course you see the red box. You check just for "!is_empty(Q1_Comment)".
Because it is empty the warning is shown.

But you see it in your second scenario:
If question is answered -> comment must not be empty.
And for the question validation at the start also "both empty" must be okay.

(!is_empty(Q1) AND !is_empty(Q1_comment)) OR
(is_empty(Q1) AND is_empty(Q1_comment))

Best regards
Joffm

Connexion pour participer à la conversation.

Plus d'informations
il y a 1 mois 2 jours #159728 par AdelAli
AdelAli a répondu au sujet : Validation Equation Only if question is answered
Thank you Joffm.. you solved the problem..

Regards,

Connexion pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!