Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: only one question should be answered in a question group

only one question should be answered in a question group 3 years 4 months ago #98610

  • first
  • first's Avatar
  • Offline
  • Platinum Lime
  • Posts: 329
  • Thank you received: 35
  • Karma: 15
I have display order group by group and I have two multi choice questions (D1 and D1Other) in a group .I want only one question must be answered. I have validation equation (((count(that.D1.NAOK)) >0) || ((count(that.D1Other.NAOK)) >0)) so that at least one of them should be answered .Can some one suggest how can I modify this equation so that only one question must be answered?
Survey Designer and Programmer
"I always suggest to have a group by group display layout and create a seprate group for each question. This will be extra work but you will get flexiblity to create your question by using more than more lime survey question types."
The administrator has disabled public write access.

only one question should be answered in a question group 3 years 4 months ago #98617

  • first
  • first's Avatar
  • Offline
  • Platinum Lime
  • Posts: 329
  • Thank you received: 35
  • Karma: 15
(((((count(that.D1.NAOK)) >0) || ((count(that.D1Other.NAOK)) >0))) && (!(((count(that.D1.NAOK)) >0) && ((count(that.D1Other.NAOK)) >0)))) should work fine:)
Survey Designer and Programmer
"I always suggest to have a group by group display layout and create a seprate group for each question. This will be extra work but you will get flexiblity to create your question by using more than more lime survey question types."
The administrator has disabled public write access.
Time to create page: 0.529 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form