Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Multiple Choice Validation

  • ogursoy
  • ogursoy's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 4 months ago - 6 years 4 months ago #161703 by ogursoy
Multiple Choice Validation was created by ogursoy
I want to have a survey with only 1 question having multiple choice with checkbox. Each sub question has some score -which I could not figure out to implement yet-. Number of maximum answers is not enough. I need to validate the sub question's "scores"and sum must be <= 36 and >0.

How can I do that?

How can I add "scores" to the subquestions and make a validation once form is submitted? (or even before submit if there can be a notification for the user)

Thank you!
Last edit: 6 years 4 months ago by ogursoy.
The topic has been locked.
  • ogursoy
  • ogursoy's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 4 months ago #161708 by ogursoy
Replied by ogursoy on topic Multiple Choice Validation
Solution :
question tip :

{if((intval(substr(Q1_1.shown,-7,1))+intval(substr(Q1_2.shown,-7,1))+intval(substr(Q1_3.shown,-7,1))+intval(substr(Q1_4.shown,-7,1))>12),'Total of 12 selected ! ','Please select total of 12')}

question validation:
(intval(substr(Q1_1.shown,-7,1))+intval(substr(Q1_2.shown,-7,1))+intval(substr(Q1_3.shown,-7,1))+intval(substr(Q1_4.shown,-7,1))>12)

Thanks anyway..
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose