Welcome to the LimeSurvey Community Forum

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

How to verify a total does not exceed a certain amount?

  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
7 years 1 month ago #147893 by blocka
I have an array style question with 3 rows and 4 columns (see attached). Ideally, what I want is for the respondent to be able to select any combination, as long as the total doesn't exceed 100%.

If I can't do it with this question type (which currently is just type = Array), I'm open to alternatives, as long as I can prevent the user from selecting an amount that is greater than 100%.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 1 month ago - 7 years 1 month ago #147897 by DenisChenu
Hi,

em_validation_q : manual.limesurvey.org/Question_type_-_Ar...28em_validation_q.29

For example : using assessment (activate assessments)
- Set value for each answer : 25/50/75/100
- set em_validation_q to sum(self.NAOK) <=100
- you can put in the 'tip' : actual total are {sum(self.NAOK)}

If you need to allow your user to set 76.3 (for example) : look at manual.limesurvey.org/Question_type_-_Mu..._.28slider_layout.29

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.
Last edit: 7 years 1 month ago by DenisChenu.
The following user(s) said Thank You: blocka
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 1 month ago - 7 years 1 month ago #147913 by holch
I think the ideal questiontype for this kind of question would be the multiple numeric, which already allows the calculation of the 100% per default. Of course this won't work if you need exactly these steps of %.

Or of course the slider layout that Denis is recommending.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 7 years 1 month ago by holch.
The following user(s) said Thank You: blocka
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
7 years 1 month ago #147937 by blocka
The Multiple Numerical input using slider seems like an attractive solution. Is there a way to get the slider to step in increments like 0, 25, 50, 100? Instead of just limiting to integer?
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
7 years 1 month ago #147939 by blocka
Oh, got it Slider accuracy = 25 ... Perfect!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose