Check out the LimeSurvey source code on GitHub!

Validation os subquestions on Array (text)

More
4 years 4 weeks ago #91451 by nuin
Hi

My first post to the forum.

We have been using Limesurvey for some months to create our surveys, but we reached a point where we might need some help. We have a question designed as an Array (text) with 12 subquestions (Y range) and 7 options (X range). in this question the user has to select at least one of the 7 options on each subquestion.

What would be the best way to validate at least one selection per option? Or is there a better way to design the question by changing its type?

Any help is appreciated.

Paulo

Please Log in to join the conversation.

More
4 years 4 weeks ago #91458 by Mazi
This should be doable by using the Expression Manager and using the COUNT() statement.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The following user(s) said Thank You: nuin

Please Log in to join the conversation.

More
4 years 4 weeks ago #91471 by nuin
Thanks, it clarifies a bit, but I am struggling to find the right syntax and location:

- I am using
count(lte_A_1, lte_A_2, lte_A_3, lte_A_4, lte_A_5, lte_A_6, lte_A_7) >= 1

where lte_A is one of the subquestions (Y scale) on the array and 1-7 are the text boxes on the X scale. I tried only for the first subquestion and it accepted an empty input when the I put this validation rule on the Question validation.

- when I use the same rule in the subquestion validation box the survey is not submitted even with more than one options selected.

BTW, we are intending to use X and the text entered in the array boxes.

Thanks a lot

Please Log in to join the conversation.

More
4 years 4 weeks ago #91593 by nuin
I was missing the question id before the Y scale IDs. That solved and the counts are working fine now.

Thanks a lot

Paulo

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form