View Issue Details

IDProjectCategoryView StatusLast Update
11533Bug reportsSurvey takingpublic2017-06-07 09:34
Reportervkuzmin Assigned Tomarkusfluer 
PriorityurgentSeverityminor 
Status closedResolutionfixed 
Product Version2.50.x 
Fixed in Version2.56.x 
Summary11533: Sliders with any initial value canot be mandatory (slider_user_no_action_ always 0)
DescriptionIf you go to the question options-Advanced settings-Slider and set any value in "Slider initial value" or even set "Slider starts at the middle position" to "On" 'slider_user_no_action_'.$myfname field appear with 0 instead of 1.
Steps To Reproduce1) Make new "Multiple numerical input" question.
2) Set "Mandatory" to On.
3) Set Advanced settings - Slider - "Use slider layout" to On.
4) Set "Slider starts at the middle position" to On or set any value at "Slider initial value" field.
5) Add some subquestions.

Run this survey and try to continue without an answer.
Additional InformationThis bug dont exist in the last stable release limesurvey250plus-build160804.
See https://bugs.limesurvey.org/view.php?id=11516
(That bug a was a lot more important and this one about appearance at the first time).
TagsNo tags attached.
Complete LimeSurvey version number (& build)5fe8b845739492f8edc057b072c6
I will donate to the project if issue is resolvedNo
BrowserChrome and Firefox
Database & DB-Versionmysqlnd 5.0.10 - 20111026
Server OS (if known)Windows 7 sp1 x64
Webserver software & version (if known)Apache/2.4.6 (Win32)
PHP VersionPHP/5.4.17

Relationships

related to 12001 closedmarkusfluer Slider question records value when untouched by respondent 
parent of 12445 closedc_schmitz Slider "Slider initial value" not recorded in data 

Activities

vkuzmin

vkuzmin

2016-08-09 14:16

reporter  

markusfluer

markusfluer

2016-08-10 15:55

administrator   ~40236

What is your purpose of an initial value and mandatory at once?
There is a deeper problem with the slider definition.
We cannot use the bootstrap-slider with an inital value and no value.
Maybe we should deactivate the at-once usage of initial/default-value and mandatory.
We are open for ideas here.
vkuzmin

vkuzmin

2016-08-10 16:58

reporter   ~40238

Last edited: 2016-08-11 10:31

View 8 revisions

This issue about appearance at the first place.
i think that 'slider_user_no_action_'.$myfname should be saved in survey session or may be in cookies.

Or another way.

Part of slider's HTML code:
<div class="slider-handle min-slider-handle" role="slider" aria-valuemin="0" aria-valuemax="100" aria-valuenow="5" style="left: 5%;" tabindex="0"></div>

Only for mandatory sliders.
Can you change style="left: 5%;" to actual percents instead of change slider value? 50% if "Slider starts at the middle position" is on at least.
5 is magic number from bootstrap-slider.js, string 734: defaultOptions: {value: 5} so sliders always have something as value.

Now I think its bootstrap-slider.js issue: https://github.com/seiyria/bootstrap-slider/issues/614

markusfluer

markusfluer

2016-08-11 10:43

administrator   ~40248

I tried to insert something into the slider
https://github.com/seiyria/bootstrap-slider/pull/612
But is was declined, so I think we will fork the slider and implement the null value.
When we do that, we can also think of a way to position the slider somewhere without actually setting a value rendering the extra attribute ┬┤slider_user_no_action┬┤ unnessecary.
Would that be a solution?
vkuzmin

vkuzmin

2016-08-11 10:58

reporter   ~40250

Last edited: 2016-08-11 11:17

View 7 revisions

Yes, with that change you can set slider visible value to center and ignore "Slider starts at the middle position" option for mandatory questions with sliders. Or may be add additional parameter for "Slider initial value" field. And i'm sorry, i'm used limesurvey version with unchanged js 9.1.3 file when i typed (40238) note.

markusfluer

markusfluer

2016-12-13 19:51

administrator   ~42542

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=21765
c_schmitz

c_schmitz

2017-01-06 12:15

administrator   ~42652

New version released.

Related Changesets

LimeSurvey: master 1cd88392

2016-12-13 19:50:58

markusfluer

Details Diff
Fixed issue 11533: Sliders with any initial value canot be mandatory (slider_user_no_action_ always 0) Affected Issues
11533
mod - application/helpers/qanda_helper.php Diff File
mod - application/views/survey/questions/multiplenumeric/rows/sliders/answer_row.php Diff File

Issue History

Date Modified Username Field Change
2016-08-09 14:16 vkuzmin New Issue
2016-08-09 14:16 vkuzmin File Added: limesurvey_survey_368443 (1).lss
2016-08-10 09:04 c_schmitz Assigned To => markusfluer
2016-08-10 09:04 c_schmitz Status new => assigned
2016-08-10 09:04 c_schmitz Priority none => urgent
2016-08-10 15:55 markusfluer Note Added: 40236
2016-08-10 15:55 markusfluer Status assigned => feedback
2016-08-10 16:58 vkuzmin Note Added: 40238
2016-08-10 16:58 vkuzmin Status feedback => assigned
2016-08-10 17:01 vkuzmin Note Edited: 40238 View Revisions
2016-08-10 17:02 vkuzmin Note Edited: 40238 View Revisions
2016-08-10 17:02 vkuzmin Note Edited: 40238 View Revisions
2016-08-11 09:46 vkuzmin Note Edited: 40238 View Revisions
2016-08-11 09:46 vkuzmin Note Edited: 40238 View Revisions
2016-08-11 09:54 vkuzmin Note Edited: 40238 View Revisions
2016-08-11 10:31 vkuzmin Note Edited: 40238 View Revisions
2016-08-11 10:43 markusfluer Note Added: 40248
2016-08-11 10:58 vkuzmin Note Added: 40250
2016-08-11 10:59 vkuzmin Note Edited: 40250 View Revisions
2016-08-11 11:03 vkuzmin Note Edited: 40250 View Revisions
2016-08-11 11:10 vkuzmin Note Edited: 40250 View Revisions
2016-08-11 11:12 vkuzmin Note Edited: 40250 View Revisions
2016-08-11 11:16 vkuzmin Note Edited: 40250 View Revisions
2016-08-11 11:17 vkuzmin Note Edited: 40250 View Revisions
2016-12-13 19:50 markusfluer Relationship added related to 12001
2016-12-13 19:51 markusfluer Changeset attached => LimeSurvey master 1cd88392
2016-12-13 19:51 markusfluer Note Added: 42542
2016-12-13 19:51 markusfluer Resolution open => fixed
2016-12-13 19:52 markusfluer Status assigned => resolved
2016-12-13 19:52 markusfluer Fixed in Version => 2.56.x
2017-01-06 12:15 c_schmitz Note Added: 42652
2017-01-06 12:15 c_schmitz Status resolved => closed
2017-06-07 09:34 DenisChenu Relationship added parent of 12445