Welcome to the LimeSurvey Community Forum

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

Test User before he is allowed to Continue

  • WhyCantWeBeFriends
  • WhyCantWeBeFriends's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago #199874 by WhyCantWeBeFriends
Test User before he is allowed to Continue was created by WhyCantWeBeFriends
Hey There

I'm currently working on a survey in LimeSurvey version 2.62.2. The test passes the actual survey groups, and before that a group with a sample task to show the user what to expect.

I would like to make sure that the user has understood the task format, and I don't want him to move on to the next group until he has answered the sample tasks correctly.

Is this possible? If so, maybe you can give me a hint how?

Thanks a lot in advance!
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #199876 by Joffm
Replied by Joffm on topic Test User before he is allowed to Continue
You may set a validation on the last question.
Without knowing what this exactly is

until he has answered the sample tasks correctly.

you may validate like

Q1==3 and Q2==4 and Q3==5, if these are the correct answers.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: cdorin, WhyCantWeBeFriends
The topic has been locked.
  • WhyCantWeBeFriends
  • WhyCantWeBeFriends's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago #199896 by WhyCantWeBeFriends
Replied by WhyCantWeBeFriends on topic Test User before he is allowed to Continue
Hey Joffm,,

thanks for the fast Reply!

I want to validate Radio Buttons, they dont seem to have an Validation Attribute. Is it possible to take another Question type and use their Validation, but leave the Question itself invisible?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #199898 by Joffm
Replied by Joffm on topic Test User before he is allowed to Continue
Of course you can validate.
Each answer option has a code.
So you just say "Q1==3" and you only can proceed if in question Q1 the answer option with code "3" was selected.

This is exactly what I showed before.

But if you still use these dehault alphanumeric codes "A1", "A2", ...
it is "Q1=="A3"

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: WhyCantWeBeFriends
The topic has been locked.
  • WhyCantWeBeFriends
  • WhyCantWeBeFriends's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago - 3 years 10 months ago #199901 by WhyCantWeBeFriends
Replied by WhyCantWeBeFriends on topic Test User before he is allowed to Continue
I think my Problem is, that i cant find the Validation field for a Question that is the Questiontype "List (Radio)" (Liste(Optionsfeld) in German).

So i tried to create an invisible freetext Question, but then the Validation seems to be "true", no matter what answer i post (esideniden the question is visible, then the validation works as I imagine it!)


Seems like that this user had the same Problem - is there any Workaround already?
forums.limesurvey.org/forum/installation...e-i-agree-list-radio
Last edit: 3 years 10 months ago by WhyCantWeBeFriends.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #199903 by Joffm
Replied by Joffm on topic Test User before he is allowed to Continue
Oh, you're right.

In 2.50/2.73 there is no validation.

I tested in 3.x.

What you can do:
You have questions of type radio.

As a last question take a question of type "short text". Here Q1a, Q1b and Q1c
Relevance equation:
(!is_empty(Q1a) and !is_empty(Q1b) and !is_empty(Q1c)) and (Q1a!=1 OR Q1b!=2 OR Q1c!=3)
You see the correct answers are 1, 2 3
Therefore this question is only shown if all radio questions are answered AND there are wrong answers.

The validation of the question is the correct case:
Q1a==1 and Q1b==2 and Q1c==3

Now you remove the textt field of this question by setting a css class "mytext" and adding this to your template.css
.mytext .answer-container {display:none;}








Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #199930 by DenisChenu
Replied by DenisChenu on topic Test User before he is allowed to Continue
If you show the freetext question (i mean don't hide it with setting) : it work.

I use this a lot before adding it for near all question type …

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