Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Array (Numbers) Mandatory not working

Re:Array (Numbers) Mandatory not working 3 years 9 months ago #53860

  • lemeur
  • lemeur's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 31
  • Karma: 15
@dragxslay,
I don't buy this theory because mandatory should enforce some type of answer.

You have a problem here: you just don't listen to what we say... and don't try to understand.
This is not a technical issue: your problem is that you are not correctly describing your needs .

Mandatory clearly means that an answer must be given to the question. Since checkboxes are only 2 states input, it can only have 2 values: ON or OFF, and both values are valid answers. This means that if no checkbox is checked, LS must assume that the participant has decided to answer "OFF" to all checkboxes, which IS A VALID response.

What you want to achieve is not to set the quesiton as mandatory, but to enforce a minimum of 1 checkbox checked. This is semantically completely different.

So to sum things up:
* you can use a dropdown version, then you could have Yes/No/Unanswered (3-states) input
* Or try a list of checkbox with the min_answers script (but I'm not sure it isa vailable for array_numbers with checkbox layout yet).

Best regards,
Thibault
The administrator has disabled public write access.

Re:Array (Numbers) Mandatory not working 3 years 9 months ago #54185

  • dragxslay
  • dragxslay's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
@Lemeur

No need to be a douchebag about it. I did listen to what was said and understand it's not viewed as a "technical issue." And I obviously did correctly describe my needs because your post drives at the answer I'm looking for. If you read my last post slowly, you would see that I'm looking for a workaround to solve my problem locally.

If I have to manually modify the code to ensure that at least one of the checkboxes was checked, I'll gladly handle that. I was just looking for someone to point me in the right direction so I knew where to start taking apart the code to apply a fix. I'm not familiar with the min_answers script but it appears this is not available yet anyway.

If I could steer my client away from using this product I would. Unfortunately they've been using it too long so switching now would be more complicated then modifying the code to get it working the way they need.
The administrator has disabled public write access.

Re:Array (Numbers) Mandatory not working 3 years 9 months ago #54186

  • berritorre
  • berritorre's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 1
  • Karma: 0
If I could steer my client away from using this product I would. Unfortunately they've been using it too long so switching now would be more complicated then modifying the code to get it working the way they need.

What would be your alternative? (honest question). I have tested quite a few products in this area. Every alternative that is on par when it comes to options, was extremely expensive. What would you suggest?
The administrator has disabled public write access.

Re:Array (Numbers) Mandatory not working 3 years 9 months ago #54187

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6362
  • Thank you received: 827
  • Karma: 245
Alternative solution,

Use javascript :)

tpartner already make a workaround for an array of text : docs.limesurvey.org/tiki-index.php?page=...f_an_array_mandatory

You can use the
// Interrupt the submit function
To control how many checkbox are checked. To do that you can use the jquery checked selector api.jquery.com/checked-selector/

Need some work but not so heavy i think.
The administrator has disabled public write access.

Re:Array (Numbers) Mandatory not working 3 years 9 months ago #54192

  • lemeur
  • lemeur's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 31
  • Karma: 15
@dragxslay,
No need to be a douchebag about it.
How would you expect me to react when I read your comment:
So the folks handling the bugs are claiming this isn't a bug because checkboxes can be 0/1. I don't buy this theory because mandatory should enforce some type of answer.

The fact is that this was your own opinion, but another user could say that mandatory must mean at least 1 checkbox on "one of the lines" (not 1 checkbox per line), or even 2 checkboxes, ...

This is why I said you weren't describing your needs correctly. I knew that you wanted 1 checkbox checked per line, but you were still talking about the "Mandatory" property.

However, I agree that in this kind of situation the survey designer should be warned that the mandatory option can't be enforced for checkbox questions.
If you read my last post slowly

Unfortunately I have little time, when questions are very short and accurate they receive accurate and short answers. When they are too long, I can only point to the right way to ask the question.
I was just looking for someone to point me in the right direction so I knew where to start taking apart the code to apply a fix.

I think I've given you ideas of what to look for in the code: dropdown lists or min_answers script (in qanda.php by the way).
If I could steer my client away from using this product I would.

This is free software, everyone is free to use it... or not.
By the way, I'm happy to know that you have a client and are paid for this work, because most of us (devs and support guys) work for free on our spare time. This explains why we need to save time and ask our users to help us support them by clearly explaining their needs, and listen to what they've beeing replied ;-)

Now, let's be honest, "yes", I admit that that day I was very touchy and grumpy... but hey... I'm human ;-)

Thibault
Last Edit: 3 years 9 months ago by lemeur.
The administrator has disabled public write access.

Re:Array (Numbers) Mandatory not working 3 years 9 months ago #54196

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
Thibault is human? Wasn't "Thibault" that coding robot which was invented by NASA and bought by Limesurvey from the Limesurevy donations?

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.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.175 seconds
Donation Image