Hi,
I quickly checked your code:
{
name: 'Slider',
id: 'confidence',
mainText: '2. How confident are you in your answer for question 1?',
texts: {
currentValue: function(widget, value) {
return '<datalist id="tickmarks" style="font-size: 14px"><option value="50" label="50"></option><option value="100" label="100"></option></datalist><datalist id="tickmarks" style="font-size: 12px"><option value="50" label="Not Confident at All"></option><option value="100" label="Fully Confident"></option></datalist>Confidence Level: ' + value;
}},
min: 50,
max: 100,
step: 5, //this doesn't actually do anything, instead it is created in the cb function
initialValue: 50,
displayNoChange: false,
required: true
}
Here is some explanations, that should also go into the wiki page for clarity.
What is inside texts: "xxx" is just for display, it is not returned by the .getValues method.
Your starting value is 50, end value is 100, and you have steps of 5. This means that you have in total 10 units in your slider: (100-50)/5. The slider goes always from 0 to 100, so each unit is valued 10.
When the slider is completely to the left, the display is 50, but the value is 0. If you move the slider one unit to the right, the display is 55, but the returned value is 10, the next displayed value is 60, and the next returned value is 20, and so on.
Hope it solves the mistery...
Best,
Stefano