Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:
  • Page:
  • 1
  • 2

TOPIC: Array (Numbers) Mandatory not working

Array (Numbers) Mandatory not working 6 years 5 days ago #53308

  • dragxslay
  • dragxslay's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
I've got an Array (Numbers) type question that is set as mandatory, but I'm able to bypass the question without answering it. Is this a bug in the survey app?

Can someone point me in the right direction to fix the logic testing on the mandatory questions for Array (Numbers) if this is the case? Thank you in advance!
The administrator has disabled public write access.

Array (Numbers) Mandatory not working 6 years 5 days ago #53312

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6029
  • Thank you received: 373
  • Karma: 260
Please test if the problem still exists at the latest release. If so please open a ticket at the Bugtracker and...

1. Give as much information as possible

2. Attach your survey. You can mark your ticket "private" so that only the developers will be able to take a look at it.

3. Provide step-by-step instructions how to reproduce the problem.

4. If possible/helpful please provide screenshots

Afterwards please post the link to the Bugtracker so we can follow the progress.

Thanks!

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The administrator has disabled public write access.

Array (Numbers) Mandatory not working 6 years 1 day ago #53552

  • dragxslay
  • dragxslay's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
Mazi,

Thanks for the feedback. I posted in the bug tracker here: bugs.limesurvey.org/view.php?id=4793

I would be happy to try and resolve the problem myself and submit it back to the project for inclusion, but I need someone with more in depth knowledge of the error checking process that can explain to me how the array portion with checkboxes works and where I should focus my efforts. Thanks in advance!
The administrator has disabled public write access.

Array (Numbers) Mandatory not working 6 years 1 day ago #53560

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9580
  • Thank you received: 1374
  • Karma: 390
I have a question for mandatory with checkbox.

For checkbox, i think it's difficult to have a mandatory question, it's why we have minimum answer for multi choice option.

For array: Mandatory mean : one answer for each line or for each column ?
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (use private message).
The administrator has disabled public write access.

Array (Numbers) Mandatory not working 6 years 1 day ago #53582

  • lemeur
  • lemeur's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 31
  • Karma: 15
Mandatory for array questions: means at least one answer per line (except for the by-column variant of array-label questions).

But as far as Array-Numerical with "Checkbox-layout" are concerned, it is not possible to say if the user has answered "unchecked" or if he has not answered.

Thibault
The administrator has disabled public write access.

Array (Numbers) Mandatory not working 6 years 1 day ago #53591

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6029
  • Thank you received: 373
  • Karma: 260
lemeur wrote:
Mandatory for array questions: means at least one answer per line (except for the by-column variant of array-label questions).

But as far as Array-Numerical with "Checkbox-layout" are concerned, it is not possible to say if the user has answered "unchecked" or if he has not answered.

Thibault
So if I got that right it doesn't matter if a Array-Numerical with "Checkbox-layout" question is set to mandatory or not?
Because currently you can click next without any warning at this question type even if the question is set to be mandatory.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The administrator has disabled public write access.

Array (Numbers) Mandatory not working 6 years 1 day ago #53607

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9580
  • Thank you received: 1374
  • Karma: 390
lemeur wrote:
Mandatory for array questions: means at least one answer per line (except for the by-column variant of array-label questions).

But as far as Array-Numerical with "Checkbox-layout" are concerned, it is not possible to say if the user has answered "unchecked" or if he has not answered.

Thibault
My question aren't for dev, but for user :)

dragxslay: what is for you a array checkbox mandatory ?
1 answer for all array ?
1 answer for each line ?
....

I think it's good to have a
Min answer by line / min answer by column / min|max answer whole aray etc ... (and it's more difficult)

But put a mandatory in a array checkbox aren't good for whole user.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (use private message).
The administrator has disabled public write access.

Array (Numbers) Mandatory not working 6 years 23 hours ago #53638

  • dragxslay
  • dragxslay's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
Well, if I set it to mandatory, the idea is that I want at least one answer for each line. So in my example survey (www.araxam.com/limesurvey/index.php?sid=76251&lang=en) question 2, each type of tire needs to have 1 or more checkboxes checked off.

If this is not possible as part of the limesurvey project, how can I modify my copy of the script to enforce this? Thanks!!
The administrator has disabled public write access.

Array (Numbers) Mandatory not working 5 years 11 months ago #53730

  • dragxslay
  • dragxslay's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
Hi Lemeur,

I understand what you're saying and it's definitely valid - technically "unchecked" is an answer. However, if I set the question to mandatory, shouldn't that technically say that "unanswered" is not an acceptable answer anymore? Just a thought - do the drop downs allow a blank answer if set to mandatory? Thanks!
The administrator has disabled public write access.

Array (Numbers) Mandatory not working 5 years 11 months ago #53855

  • dragxslay
  • dragxslay's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
Mazi,

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. Regardless, I understand their position and if they don't want to fix it in the code of the project, I still need to add a fix to my sample for this.

Would you or someone else be able to point me to the spot in the error checking where I can add a work around for this problem in my code?

Thank you in advance!!
The administrator has disabled public write access.

Array (Numbers) Mandatory not working 5 years 11 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.

Array (Numbers) Mandatory not working 5 years 11 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.

Array (Numbers) Mandatory not working 5 years 11 months ago #54186

  • berritorre
  • berritorre's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 9
  • Thank you received: 1
  • Karma: 1
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.

Array (Numbers) Mandatory not working 5 years 11 months ago #54187

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9580
  • Thank you received: 1374
  • Karma: 390
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.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (use private message).
The administrator has disabled public write access.

Array (Numbers) Mandatory not working 5 years 11 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: 5 years 11 months ago by lemeur.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.384 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form