Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Error message without validation equation

  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 7 months ago #205599 by brais24
Hi people, I write you again because i have a question that i dont found answer, i explain you.

I have 2 question, for example Q1 (wich is a yes/not question), and a Q2(wich is a matrix question wich have too A1(yes) subquestion and A2(not) subquestion.

I want to show an error message if you select NO on both questions, I be able to do that with equation validation question and tips for equation validation question, but the problem if i do with that way is, you only can continue with the survey if the validation is done.

What i want is show the error message if both is NO, but even if both is NO you can continue with the survey, do you know any way to do that?

My LS version is 2.72

Thanks for the help
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 7 months ago - 3 years 7 months ago #205601 by Joffm
Replied by Joffm on topic Error message without validation equation

What i want is show the error message if both is NO, but even if both is NO you can continue with the survey, do you know any way to do that?


The way I would go is to have no error message that stops the respondent, but to have a validation tip in different color (red) if there are two "No".
And the validation equation itself is something that is always true.

Nevertheless I do not quite understand your design of the array with "Yes" and "No" as subquestions. Or are they "answer options"?

So please send these two questions as lss export.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 7 months ago by Joffm.
The topic has been locked.
  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 7 months ago #205602 by brais24
Replied by brais24 on topic Error message without validation equation
Yes, sorry, is an answer option, I cant export lss right now but i can sen an image of the questions, I want show the error message on the second question that say somethinh like "You have selected NO on this question and on a previous question, please, make sure that is right"
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 7 months ago - 3 years 7 months ago #205603 by Joffm
Replied by Joffm on topic Error message without validation equation
Hi,
do you have any reason why you use two different types of question?
Okay:
validation equation:
(Q5A=="Y" OR Q5A=="N") AND (Q5B_SQ001==[Code of Si] OR Q5B_SQ001==[Code of No])
So this is always true.

Validation tip:
{if(Q5A=="N" and Q2_SQ001==Code of No,"<span style='color:red'>You have selected NO on this question and on a previous question, please, make sure that is right</span>","That's fine")}

As I do not know how the codes are, it's up to you.
But you see how it can be done.

Joffm



I don't know why it is mixed up.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 7 months ago by Joffm.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 7 months ago #205608 by DenisChenu
Replied by DenisChenu on topic Error message without validation equation
I use an Dispaly text question for such system.

I put condition on this question and good class name

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 7 months ago #205612 by Joffm
Replied by Joffm on topic Error message without validation equation
Exactly, much better, much easier.

In 2.73 template "default"


Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 7 months ago #205628 by DenisChenu
Replied by DenisChenu on topic Error message without validation equation
You can even add a checkbox question (multiple choice with one option) mandatory.

«Please confirm you want to answer both question with No"

then : you allow user to answer no, but they have to confirm it.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 7 months ago #205671 by brais24
Replied by brais24 on topic Error message without validation equation
Ok, thanks for the help, I will try what you say.

I know the method with display text, but I want a message inside of the second question, for that reason I dont use that.

Thanks to all.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 7 months ago #205681 by DenisChenu
Replied by DenisChenu on topic Error message without validation equation
You can even add in question text :

{if(YOIUREST,"","<p class='alert alert-danger'>You choose NO 2 times, your realluy sure ?</p>")}

Replace YOURTEST :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose