Welcome to the LimeSurvey Community Forum

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

Flip vertical slider

  • shivani123
  • shivani123's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 2 months ago - 7 years 2 months ago #146312 by shivani123
Flip vertical slider was created by shivani123
Can I Flip vertical slider of multiple numerical question type slider(vertical).

As in screenshot the slider should star at bottom and with limit 1 and end with limit 10 at top.
Can someone give solution on this..
Thank you...
Attachments:
Last edit: 7 years 2 months ago by shivani123.
The topic has been locked.
More
7 years 2 months ago #146313 by Ben_V
Replied by Ben_V on topic Flip vertical slider
Please check this previous post

Customize or create new Question type

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 2 months ago #146314 by DenisChenu
Replied by DenisChenu on topic Flip vertical slider
No need extra system / hacking etc ....



Maybe just some css

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.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 2 months ago #146317 by tpartner
Replied by tpartner on topic Flip vertical slider
Placing this script in the question text will reverse the slider direction. (maybe this should be a question setting)

Code:
<script type="text/javascript" charset="utf-8">    
 
  $(document).ready(function() {    
    setTimeout(function() { 
      $('#question{QID} input[type="text"]').bootstrapSlider('setAttribute', 'reversed', true); 
      $('#question{QID} input[type="text"]').bootstrapSlider('refresh');
    }, 100);    
    });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: shivani123
The topic has been locked.
More
7 years 2 months ago #146325 by jelo
Replied by jelo on topic Flip vertical slider

DenisChenu wrote: No need extra system / hacking etc .... Maybe just some css

Reverse the vertical slider scale. Not from horizontal to vertical. How should that be done without the approach Tpartner is showing?

I tried to swap the min/max values. Which worked visually. But no way to drag the slider down since the logic prevented any movement.


The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: shivani123
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 2 months ago #146340 by tpartner
Replied by tpartner on topic Flip vertical slider

How should that be done without the approach Tpartner is showing?

As I suggested, perhaps it should be a question setting. That way it could be included in the slider initiation function instead of applied after initiation (thus avoiding the small time delay). Of course, if it was a question setting, we would also need to handle the slider max/min and left/right text positions.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 2 months ago #146341 by DenisChenu
Replied by DenisChenu on topic Flip vertical slider
Ouos, seems i didn't see/understand the reverse :)

@tparner : why not a new attribute : seems easy in develop : github.com/LimeSurvey/LimeSurvey/blob/de...s/answer_row.php#L42

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.
The following user(s) said Thank You: shivani123
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 2 months ago #146343 by tpartner
Replied by tpartner on topic Flip vertical slider
Yes, exactly :)
But you'd also need to handle the max/min text and left/right text positions (which don't seem to work very well in vertical anyway.)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: shivani123
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 2 months ago #146344 by DenisChenu
Replied by DenisChenu on topic Flip vertical slider

tpartner wrote: But you'd also need to handle the max/min text and left/right text positions (which don't seem to work very well in vertical anyway.)

Yep, seems broken currently. But : any idea for the best place ?

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.
The topic has been locked.
More
7 years 2 months ago #146347 by jelo
Replied by jelo on topic Flip vertical slider
Most survey packages stick to left / right labeling when offering vertical slider in the same question type as horizontal slider.

Often there is a section for visual representation.
Beside a option for just hiding values you sometimes find a option to "flip min and max values".

Personally I would find a option for N/A (not applicable) more useful than flipping the scale orientation ;-)
But Limesurvey is trying to cramp too many options in too few questiontype.
More questiontypes with less options will be better for users and developers. Question type objects where are you?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 2 months ago #146348 by tpartner
Replied by tpartner on topic Flip vertical slider
My opinion for the text positioning in vertical sliders would be:

Min/Max text - To the left of the slider
Left/Right text - Above and below the slider


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The topic has been locked.
More
7 years 2 months ago #146352 by jelo
Replied by jelo on topic Flip vertical slider

tpartner wrote: My opinion for the text positioning in vertical sliders would be:
Min/Max text - To the left of the slider
Left/Right text - Above and below the slider

I second that.
But I am only into left to right reading.
I assume RTL reader are also top to down oriented.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose