The bpSliders function converts a Qualtrics Slider question into Bipolar or AHP (Analytical Hierarchy Process) Sliders. Functionality includes:
This function is available for a reasonable fee. Contact TomG on the Qualtrics Community to learn more.
Add the bpSliders function to the survey header to make it available to any question in the survey. Go to Look & Feel → General → Header edit →
and paste the provided bpSliders function JS:
<script>/*Paste bpSliders function JS here*/</script>
Alternatively, paste the bpSliders function JS into a question's JS outside the existing Qualtrics functions to make it available to questions on the page.
Add JS to call the bpSliders function to apply it to the Slider question as follows:
Qualtrics.SurveyEngine.addOnload(function() {
bpSliders(this);
});
To override the default options, specify the desired options in the second function argument as an object. For example:
Qualtrics.SurveyEngine.addOnload(function() {
bpSliders(this,{showScale:true,repeatScale:3});
});
Label each slider with its left and right labels using the span class bpsRight like this:
Simple<span class="bpsRight">Complex</span>
allowZero specifies if zero (0) answers should be allowed. It works in conjunction with Qualtrics custom validation and highlightErrors. For AHP sliders, setting allowZero to false is recommended because AHP scales go from 1 to 9.
Default: true (on)
highlightErrors turns highlighting of unanswered rows on or off.
Default: true (on)
highlightErrorStyle defines the CSS style used for highlighting unanswered rows.
Default: "2px dashed red"
lwidth ONLY applies to non-mobile friendly sliders and specifies the width of the slider labels in pixels.
Default: 120
repeatScale defines how often the numeric scale should be repeated if showScale is true (e.g., repeatScale:3 means repeat every 3 rows). 0 (zero) turns repeat off.
Default: 0
separationPercent specifies the minimum amount of separation that should be maintained between scale labels as a percentage of the slider width.
Default: 24
showScale specifies whether the numeric scale should be displayed.
Default: false
suppressScaleMinus specifies whether numeric scale minus signs should be suppressed if showScale is true (e.g. a numeric scale that goes from -10 to 10).
Default: true
Below is the recommended setup for AHP (Analytical Hierarchy Process) sliders.
To not allow zeros, 'AND' the following for each row:
bpSliders(this, {
showScale: true,
allowZero: false,
repeatScale: 2 //repeatScale is optional
});
Add the following JS after the bpSliders function call to modify the scale to show only odd numbers:
jQuery("#"+this.questionId+" .numbers li").each(function() {
var num = jQuery(this);
if(parseInt(num.text().trim())%2 == 0) num.text("╷");
});