bpsliders
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| bpsliders [2022/03/30 05:50] – admin | bpsliders [2023/09/24 16:52] (current) – [bpSliders - Bipolar or AHP Sliders] admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== bpSliders - Bipolar or AHP Sliders ====== | ====== bpSliders - Bipolar or AHP Sliders ====== | ||
| - | The **bpSliders** function converts a Qualtrics Slider question into Bipolar or AHP Sliders. Functionality includes: | + | The **bpSliders** function converts a Qualtrics Slider question into Bipolar or AHP (Analytical Hierarchy Process) |
| * Support and automatic detection of Mobile and non-Mobile Friendly | * Support and automatic detection of Mobile and non-Mobile Friendly | ||
| * Control of minimum spacing between scale labels | * Control of minimum spacing between scale labels | ||
| Line 8: | Line 8: | ||
| * Highlighting of unanswered rows | * Highlighting of unanswered rows | ||
| - | Here are some examples: | + | Bipolar |
| - | {{ :: | + | {{ :: |
| - | This function is available for a reasonable fee. Contact [[https:// | + | AHP example: |
| + | {{ :: | ||
| + | |||
| + | This function is available for a reasonable fee. Contact | ||
| ===== Set-up Instructions ===== | ===== Set-up Instructions ===== | ||
| + | ==== Question Settings ==== | ||
| + | * Slider question | ||
| + | * Type: Sliders | ||
| + | * Custom Start Position: 0 | ||
| + | * Scale Points: -X to X (common values for X are 5 or 10) | ||
| + | * Grid lines: 2X | ||
| + | * Mobile friendly: recommended | ||
| + | * Force response: recommended | ||
| ==== Add Function To Survey ==== | ==== Add Function To Survey ==== | ||
| - | To make the function available to all questions in the survey, copy the function to the Survey Header inside a script tag: | ||
| Add the bpSliders function to the survey header to make it available to any question in the survey. | Add the bpSliders function to the survey header to make it available to any question in the survey. | ||
| < | < | ||
| Line 28: | Line 38: | ||
| </ | </ | ||
| - | To override the default options, specify the desired options in the second function argument as an object. For example: | + | To override the default options, specify the desired |
| < | < | ||
| Qualtrics.SurveyEngine.addOnload(function() { | Qualtrics.SurveyEngine.addOnload(function() { | ||
| Line 40: | Line 50: | ||
| </ | </ | ||
| ===== Options ===== | ===== Options ===== | ||
| - | ==== highlightErrors | + | ==== allowZero |
| - | **allowZero** specifies if zero answers should be allowed. | + | **allowZero** specifies if zero (0) answers should be allowed. It works in conjunction with Qualtrics custom validation and **[[bpsliders# |
| Default: true (on) | Default: true (on) | ||
| Line 51: | Line 61: | ||
| **highlightErrorStyle** defines the CSS style used for highlighting unanswered rows. | **highlightErrorStyle** defines the CSS style used for highlighting unanswered rows. | ||
| - | Default: | + | Default: |
| ==== lwidth ==== | ==== lwidth ==== | ||
| **lwidth** ONLY applies to non-mobile friendly sliders and specifies the width of the slider labels in pixels. | **lwidth** ONLY applies to non-mobile friendly sliders and specifies the width of the slider labels in pixels. | ||
| Line 57: | Line 67: | ||
| Default: 120 | Default: 120 | ||
| ==== repeatScale ==== | ==== repeatScale ==== | ||
| - | **repeatScale** defines how often the numeric scale should be repeated if [[bpsliders# | + | **repeatScale** defines how often the numeric scale should be repeated if **[[bpsliders# |
| Default: 0 | Default: 0 | ||
| Line 69: | Line 79: | ||
| Default: false | Default: false | ||
| ==== suppressScaleMinus ==== | ==== suppressScaleMinus ==== | ||
| - | **suppressScaleMinus** specifies whether numeric scale minus signs should be suppressed | + | **suppressScaleMinus** specifies whether numeric scale minus signs should be suppressed |
| Default: true | Default: true | ||
| + | ===== Recommended AHP Configuration ===== | ||
| + | Below is the recommended setup for AHP (Analytical Hierarchy Process) sliders. | ||
| + | ==== Question Configuration ==== | ||
| + | * Custom start position: 0 | ||
| + | * Scale points: -9 to 9 | ||
| + | * Number of decimals: 0 | ||
| + | * Grid lines: 18 | ||
| + | * Show value: On | ||
| + | * Mobile friendly: On | ||
| + | ==== Custom Validation ==== | ||
| + | To not allow zeros, ' | ||
| + | * Not Empty | ||
| + | * Not Equal to 0 | ||
| + | ==== bpSliders Function Call ==== | ||
| + | < | ||
| + | bpSliders(this, | ||
| + | showScale: true, | ||
| + | allowZero: false, | ||
| + | repeatScale: | ||
| + | }); | ||
| + | </ | ||
| + | ==== Modify Scale ==== | ||
| + | Add the following JS after the bpSliders function call to modify the scale to show only odd numbers: | ||
| + | < | ||
| + | jQuery("#" | ||
| + | var num = jQuery(this); | ||
| + | if(parseInt(num.text().trim())%2 == 0) num.text(" | ||
| + | }); | ||
| + | </ | ||
| + | ====== Qualtrics Wiki ====== | ||
| + | [[start|Qualtrics Wiki]] | ||
| + | |||
bpsliders.1648633831.txt.gz · Last modified: by admin
