Welcome to the LimeSurvey Community Forum

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

Using the slider for a preference question

  • tammo
  • tammo's Avatar Topic Author
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
6 years 7 months ago #158074 by tammo
We tried to make the slider (a variant of multiple numerical question) work for the following, but we seem not to be able to get it exactly right:

we have multiple pairs (sentences with multiple words) where a respondent is asked to state her/his preference for one of the sentences on a slider scale.

Example:
Sentence 1: John is opening the door
Sentence 2: The door is being opened by John

We thought of using a slider for that, displaying sentence 1 on the left and sentence 2 on the right, but:

1. we would like to randomise the order in which these sentence are shown: so in 50% of the cases we want sentence 1 on the right, in the other 50% we want sentence 2 on the right.

2. When the slider is on the left, the preference for the left sentence is 100, the preference for the right sentence is 0, when the slider is in the middle, both sentences score 50, when the slider is on the right, the preference for the left sentence is 0, for the right sentence 100. We struggle with displaying these scores, we would like it as shown in the picture.

3. When the slider is untouched, it shows exactly in the middle, but we want to have an indication that it should be touched. Currently there is no difference between a touched slider and an untouched slider. How to indicate that best: highlight the slider when it is untouched, or highlight the slider as soon as it is touched? How to do that?

4. Would it be possible to display the score of each sentence beneath the sentence, like in the picture?

BTW: all questions will be shown one at the time, so we can time the reponses.



Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • tammo
  • tammo's Avatar Topic Author
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
6 years 7 months ago #158075 by tammo
Replied by tammo on topic Using the slider for a preference question
Using version 2.67.3, default template.


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 7 months ago - 6 years 7 months ago #158076 by LouisGac
Replied by LouisGac on topic Using the slider for a preference question
last time I was in that code:
github.com/LimeSurvey/LimeSurvey/blob/ma...lper.php#L2988-L3001

" 5. If no value at all, or if middle start, the "user no action" is recorded as null in the database"
Last edit: 6 years 7 months ago by LouisGac.
The topic has been locked.
  • tammo
  • tammo's Avatar Topic Author
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
6 years 7 months ago #158077 by tammo
Replied by tammo on topic Using the slider for a preference question
Louis: Thanks. I know nothing is recorded, but I want to give the respondent ian indication that this question has not been answered yet.


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 7 months ago #158078 by LouisGac
Replied by LouisGac on topic Using the slider for a preference question
ok you mean the color of the handle.
yep should be doable with a bit of js.
But use the bootstrap slider event rather than a "onClick"...
Something like:

theSlider.on('slideStart', function(){changeColour()});

see for example:
github.com/LimeSurvey/LimeSurvey/blob/ma...er_row.php#L183-L186
The topic has been locked.
  • tammo
  • tammo's Avatar Topic Author
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
6 years 7 months ago #158079 by tammo
Replied by tammo on topic Using the slider for a preference question
Previously (older LS version 2.6 LTS) there was a class indicating that the slider was untouched. It does not seem to be there anymore. Is that due to the newer Bootstrap technology? Could it be added again?


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 7 months ago #158081 by LouisGac
Replied by LouisGac on topic Using the slider for a preference question
slideStart is the event sent by the slider component to tell that a user touched the slider.
yes, we could use it to remove a class name "untouched" that would be present from start.
The topic has been locked.
  • tammo
  • tammo's Avatar Topic Author
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
6 years 7 months ago #158082 by tammo
Replied by tammo on topic Using the slider for a preference question
Or (even better, I think) change "untouched" to "touched". And after reset, change from "touched" to "untouched" again..

Just leaving away classes is a negative approach: the class could also be missing due to some error...


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 7 months ago #158084 by LouisGac
Replied by LouisGac on topic Using the slider for a preference question
Untouched means untouched, it doesn't mean that the slider has been touched and then that the reset button has been touched.

Else: it's a bias, a fake information.
The topic has been locked.
  • tammo
  • tammo's Avatar Topic Author
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
6 years 7 months ago #158086 by tammo
Replied by tammo on topic Using the slider for a preference question
Yes, you are right. Then: after reset: class= .has-been-reset?


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • tammo
  • tammo's Avatar Topic Author
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
6 years 7 months ago #158088 by tammo
Replied by tammo on topic Using the slider for a preference question
So at level of <div class="slider-container row">

Initial state: .slider-untouched
After move: .slider-touched
After reset (and before move): .slider-reset

Would that be workable?

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
6 years 7 months ago #158089 by LouisGac
Replied by LouisGac on topic Using the slider for a preference question
sure
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose