oTree Forum >

Range Slider

#1 by simoncolumbus

I am looking to implement a range slider, that is, a slider with two handles that allow participants to indicate the minimum and maximum of a range using a single slider. (I am trying to implement the most likely interval belief elicitation method of Schlag and van der Weele, 2015, which elicits such intervals).

Has anybody already implemented such a range slider in oTree?

#2 by gr0ssmann

I know of this two-piece slider, but haven't used it yet: https://refreshless.com/nouislider/

Perhaps my anchorless slider (https://gitlab.com/gr0ssmann/otree_slider) could even be adapted to this.

#3 by simoncolumbus

Thanks, Max. I am using your slider elsewhere (great work!) and tried to adjust it, but that doesn't look straightforward if one wants to keep the features of your solution.

The NoUiSlider looks neat; I might give that a try.

#4 by olafghanizadeh

It should be possible to implement, but you would probably need two fields and then set them with Javascript before submitting the page/form.

Write a reply

Set forum username