Welcome, Guest
Username: Password: Remember me

TOPIC: Validation os subquestions on Array (text)

Validation os subquestions on Array (text) 1 year 9 months ago #91451

  • nuin
  • nuin's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 11
  • Karma: 0
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
The administrator has disabled public write access.

Re: Validation os subquestions on Array (text) 1 year 9 months ago #91458

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5331
  • Thank you received: 296
  • Karma: 249
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)limesurvey.org'"
The administrator has disabled public write access.
The following user(s) said Thank You: nuin

Re: Validation os subquestions on Array (text) 1 year 9 months ago #91471

  • nuin
  • nuin's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 11
  • Karma: 0
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
The administrator has disabled public write access.

Re: Validation os subquestions on Array (text) 1 year 8 months ago #91593

  • nuin
  • nuin's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 11
  • Karma: 0
I was missing the question id before the Y scale IDs. That solved and the counts are working fine now.

Thanks a lot

Paulo
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.128 seconds
Donation Image