Basic question: Validate that someone types "I AGREE" in a text box

More
3 years 10 months ago #117077 by ranman22
ranman22 created the topic: Basic question: Validate that someone types "I AGREE" in a text box
Ok, I'm sure this is the most basic question ever. I have made a good-faith effort to find an answer, but it eludes me from every manual and Google search.

I have a question (Q5) that is a "Short Free Text" box. I need to have users type in the words "I AGREE" exactly (I don't care if it's all uppercase, all lowercase, or mixed -- as long as the basic phrase "i agree" is there). What on earth do I put in the "Validation" box to make this happen? Everything I have tried fails with a pop-up warning ("One or more questions have not been answered in a valid manner. You cannot proceed until these answer are valid.").

Thank you in advance for any help and for easing my frustration.

-Randy

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #117079 by DenisChenu
DenisChenu replied the topic: Basic question: Validate that someone types "I AGREE" in a text box

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).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #117124 by ranman22
ranman22 replied the topic: Basic question: Validate that someone types "I AGREE" in a text box
Thank you, Denis -- I appreciate your response.

I tried this, but it doesn't seem to work. I even created a brand new one-question survey using only this question to make sure it wasn't something else, and I still get the same error.

I have read the piece of the manual you posted the link for as well, and it isn't helping. Sorry if I'm being a dunce here. I just have this one piece to do and this project will be done. The fact that it seems like such a simple thing is what is frustrating me so much.

Any other thoughts?

Thank you.

-Randy

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #117125 by holch
holch replied the topic: Basic question: Validate that someone types "I AGREE" in a text box
Well, you need to help at least a little bit. ;-)

What exactly doesn't work? What did you exactly do? What was the result?

What version of Limesurvey are you using?

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #117127 by ranman22
ranman22 replied the topic: Basic question: Validate that someone types "I AGREE" in a text box
I am using "Version 2.05+ Build 141229".

Question Code: Q1
Type: Short Free Text
Mandatory: Yes

I need the user to simply type "I AGREE" in the box, and not be allowed to go on unless that is the case. I have tried many different things in the "Validation" field, all of them being guesses as to what is actually needed. I've tried things such as:

Q1 = "I AGREE"
Q1 = 'I AGREE'
Q1 == "I AGREE"
Q1 == 'I AGREE'
(Q1 == "I AGREE")

And pretty much every variant of it. No matter what I try in the validation field, I get a pop-up when I try out the survey and type "I AGREE" and press the submit button. The error says "One or more questions have not been answered in a valid manner. You cannot proceed until these answer are valid.".

This seems like it should be a simple thing, but I'm losing hair over it. Help! And thank you!

-Randy

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #117128 by DenisChenu
DenisChenu replied the topic: Basic question: Validate that someone types "I AGREE" in a text box
OUps, you'r rigth .

strcasecmp(self,"i agree")==0

see php.net/manual/fr/function.strcasecmp.php

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).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago - 3 years 10 months ago #117129 by ranman22
ranman22 replied the topic: Basic question: Validate that someone types "I AGREE" in a text box
Hmmm. I just tried that and it didn't work either. Screenshots attached.
Attachments:
Last Edit: 3 years 10 months ago by ranman22. Reason: typo

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #117141 by DenisChenu
DenisChenu replied the topic: Basic question: Validate that someone types "I AGREE" in a text box
Whole question validation equation (em_validation_q) not validation.

limesurvey.sondages.pro/232424.html?newtest=Y

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).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: Ben_V, ranman22

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #117158 by ranman22
ranman22 replied the topic: Basic question: Validate that someone types "I AGREE" in a text box
That did it! I totally missed that you were referring to "Question Validation Equation" -- I kept using the "Validation" field. Thank you VERY much!

-Randy

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!