Welcome to the LimeSurvey Community Forum

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

Problems with mandatory multiple numerical input question with slider

  • nicolasdr
  • nicolasdr's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 7 months ago - 1 year 7 months ago #242401 by nicolasdr
Your LimeSurvey version: 5.6.14+230403
Own server or LimeSurvey hosting: Own server
Survey theme/template: fruity
==================

I have a mandatory multiple numerical input question with slider (see lss attached). I'm not sure what I'm doing wrong here but even when the mandatory option is ON, you can go NEXT without even moving one of the sliders. I understand that question validation might be hard in this case since 0 might be a valid choice. I thought that one trick would be to set the sliders to an initial value that is very unlikely by chance (for instance "0.12" while the slider accuracy is 0.01 on a scale of 0 to 100) and then enforcing a sub-question validation using the following: (this != 0.12). This trick did not work either as it seems not possible to set the initial value to non-integer value.

Any help would be appreciated, thanks!
Last edit: 1 year 7 months ago by nicolasdr.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 7 months ago #242402 by Joffm
Well, that's obvious.

Your settings are:
Initial value: 0.1
Slider initial value set at start: ON


So the question is answered right at the beginning as each slider has a value (0.1)
Set
Slider initial value set at start: OFF

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • nicolasdr
  • nicolasdr's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 7 months ago #242404 by nicolasdr
Great thanks! Should have seen this myself.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
1 year 7 months ago #242409 by DenisChenu

Your LimeSurvey version: 5.6.14+230403
Own server or LimeSurvey hosting: Own server
Survey theme/template: fruity
==================

This trick did not work either as it seems not possible to set the initial value to non-integer value.
 
If you confirm this : it's an issue. It must be reported : community.limesurvey.org/bug-tracker/

Else with Joffm solution, you can set at 0 and set it as mandatory. To have 0 : participant must clic on slider
 

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

  • nicolasdr
  • nicolasdr's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 7 months ago #242448 by nicolasdr
Thanks again for your advice. Before reporting the issue, I have a few questions/comments:

- I've set the value to 3.99 with a slider accuracy of 0.01 and I can confirm that the value displayed in the DOM was 3 (I've checked the input tag, class="form-control answer-item numeric-item hidden" within the slider div). This seems to confirm that initial values could not be set to non-integer.

I also want to make sure the other problem I had is not worth reporting:
- Why would enabling "Slider initial value set at start" change the effect of "mandatory"? If this is the intended behavior, I'm not sure that the documentation conveys this clearly (at least I don't see this info in the "Mandatory" or "Slider initial value (slider_initial_value)" sections).

Please let me know what you think.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
1 year 7 months ago #242450 by DenisChenu
About "Slider initial value set at start" : it mean the value is SET, then the response is SET too.

I don't see other way to write.

Aboit the issue : seems really an issue, a simple lss with only this question is great !

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

More
1 year 7 months ago #242461 by nickypooh105
Unfortunately, I'm unable to log into the bug tracker site (error message: Your account may be disabled or blocked or the username/password you entered is incorrect) but I can log into limesurvey.org. I've tried creating a new account and it did not work either.

Below is the bug report I would have filed along with the lss and screenshot in case you want to report it yourself.

Your LimeSurvey version: 5.6.14+230403
Own server or LimeSurvey hosting: Own server
Survey theme/template: fruity
Mac OS 13.2.1
Firefox, Chrome
==================

1. Unable to set non-integer values (e.g. 3.99) for initial slider value when slider accuracy is not an integer (e.g. 0.01).
2. I've attached a lss file demonstrating the issue.
3. How to reproduce: Set the initial slider value to 3.99; the slider accuracy to 0.01; and enable "Slider initial value set at start". The displayed slider value is 3 and the value in the input tag (class="form-control answer-item numeric-item hidden" within the slider div) is 3.
4. A screenshot is attached.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
1 year 7 months ago #242502 by DenisChenu

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: tpartner

Please Log in to join the conversation.

  • nicolasdr
  • nicolasdr's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 7 months ago #242514 by nicolasdr
Thanks, DenisChenu!

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
1 year 7 months ago #242560 by DenisChenu
the commit github.com/LimeSurvey/LimeSurvey/pull/3057

You can apply the fic to test it;
 

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

  • nicolasdr
  • nicolasdr's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 7 months ago #242561 by nicolasdr
The fix worked for me (see screen capture).

Encore merci!
 

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose