- Posts: 7
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Using validation equation to set minimum number of answers
- irismpi
- Topic Author
- Offline
- New Member
Less
More
3 years 9 months ago #202024
by irismpi
Using validation equation to set minimum number of answers was created by irismpi
I have an Array (text) with 5 answer fields and I want people to fill in at least 3 words.
If don't want to use the function in “logic” to set the Minimum number of answers to 3 because I need to change the text that is shown (the warning note with the exclamation mark)
So I tried to use the validation equation, but I still struggle a bit with getting this right. Can someone help me in writing the correct syntax?
Question-type: Array (text)
My subquestions look like this:
Y-axis: SQ00A
X-axis: SQ001
SQ002
SQ003
SQ004
SQ005
(see also attached Picture 1)
My validation equation looks like this:
(!(is_empty(S01_SQ00A_SQ001) and is_empty(S01_SQ00A_SQ002) and is_empty(S01_SQ00A_SQ003)))
And I added a validation tip
"enter at least 3 and at most 5 words"
(see also attached Picture 2)
People should give at least 3 answers (and a maximum of 5 answers) before they can continue. They should be allowed to click on "next" when they have given a minimum of 3 answers.
However, If I click on "preview survey" I now need to fill in all 5 text-boxes before I can click on "next".
How do I change this?
(see also attached Picture 3)
If don't want to use the function in “logic” to set the Minimum number of answers to 3 because I need to change the text that is shown (the warning note with the exclamation mark)
So I tried to use the validation equation, but I still struggle a bit with getting this right. Can someone help me in writing the correct syntax?
Question-type: Array (text)
My subquestions look like this:
Y-axis: SQ00A
X-axis: SQ001
SQ002
SQ003
SQ004
SQ005
(see also attached Picture 1)
My validation equation looks like this:
(!(is_empty(S01_SQ00A_SQ001) and is_empty(S01_SQ00A_SQ002) and is_empty(S01_SQ00A_SQ003)))
And I added a validation tip
"enter at least 3 and at most 5 words"
(see also attached Picture 2)
People should give at least 3 answers (and a maximum of 5 answers) before they can continue. They should be allowed to click on "next" when they have given a minimum of 3 answers.
However, If I click on "preview survey" I now need to fill in all 5 text-boxes before I can click on "next".
How do I change this?
(see also attached Picture 3)
Attachments:
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
3 years 9 months ago #202028
by DenisChenu
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.
Replied by DenisChenu on topic Using validation equation to set minimum number of answers
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.