Welcome to the LimeSurvey Community Forum

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

Custom slider for custom array from -value to +value with default 0-position

  • Lymbics
  • Lymbics's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 6 months ago #183635 by Lymbics
Hello,

This a question by a newbie LS user. Apologies if posted in the wrong forum or already answered.

I am looking for an example, demo or template (or better: off-the-shelf solution) that shows/allows me to create custom sliders that have a scale from -3 to +3 with a default selection of the middle 0-position.

The slider label should not read the numerical value, but a word that expresses the selected value.

I found this thread that pushed me in the right direction re. slider/label:

www.limesurvey.org/forum/design-issues/1...theme-sliders#183283

Attached a quick example of the scale type I am looking for.






In the end, I'd like the slider values of -3 to +3 be translated to a database value from 0 to 7 (-3=0, -2=1 ... +2=6, +3=7).

I am using a self-hosted LS installation, running version 3.15.1+181017

Thanks for your help.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago - 5 years 6 months ago #183650 by Joffm
Hi,
1. here is a workaround to get the text on the slider handle with attached sample
www.limesurvey.org/forum/design-issues/9...alues-as-text#170835

2. If you do not display the values but the text, the scale "-3" to "+3" is irrelevant.
Just use a scale from 0-6, initial value 3.

Best regards
Joffm

Like this; more css is up to you.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 5 years 6 months ago by Joffm.
The following user(s) said Thank You: Lymbics
The topic has been locked.
  • Lymbics
  • Lymbics's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 6 months ago #183659 by Lymbics

Joffm wrote: 2. If you do not display the values but the text, the scale "-3" to "+3" is irrelevant.
Just use a scale from 0-6, initial value 3.


Hello Joffm,

Indeed. The -/+ scale was the initial thought of getting a label that indicated less/more so.

Thanks for the reply. Will try the script.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose