User Tools

Site Tools


mfcssliders

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mfcssliders [2022/10/17 13:52] adminmfcssliders [2025/02/19 11:26] (current) – [Custom Validation] admin
Line 15: Line 15:
 ===== Set-up Instructions ===== ===== Set-up Instructions =====
 ==== 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 mfCsSliders function to the survey header to make it available to any question in the survey. Go to Look & Feel -> General -> Header edit -> {{::icon_source.jpg?20|}} and paste the provided mfCsSliders function JS:
-Add the mfCsSliders function to the survey header to make it available to any question in the survey.   Go to Look & Feel -> General -> Header edit -> {{::icon_source.jpg?20|}} and paste the provided mfCsSliders function JS:+
 <code> <code>
 <script>/*Paste mfCsSliders function JS here*/</script> <script>/*Paste mfCsSliders function JS here*/</script>
Line 32: Line 31:
 <code> <code>
 Qualtrics.SurveyEngine.addOnload(function() { Qualtrics.SurveyEngine.addOnload(function() {
- mfCsSliders(this,{});+ mfCsSliders(this,{mustTotalFlag:false});
 }); });
 </code> </code>
Line 47: Line 46:
 $e{ 100 - q://QID1/ChoiceNumericEntryValue/2 - q://QID1/ChoiceNumericEntryValue/3 } $e{ 100 - q://QID1/ChoiceNumericEntryValue/2 - q://QID1/ChoiceNumericEntryValue/3 }
 </code> </code>
-When the rows of the slider are conditional through the use of carry forward or display logic, it may be necessary to use a hidden text entry question immediately after the slider question and base the slider custom validation on that question. The following code can be used to update the text entry question with the slider total:+When the rows of the slider are conditional through the use of carry forwarddisplay logic, or advanced randomization it may be necessary to use a hidden text entry question immediately after the slider question and base the slider custom validation on that question. The following code can be used to update the text entry question with the slider total:
 <code> <code>
 Qualtrics.SurveyEngine.addOnload(function() { Qualtrics.SurveyEngine.addOnload(function() {
Line 64: Line 63:
 **labelStyle** is an object that specifies css style of the scale labels. **labelStyle** is an object that specifies css style of the scale labels.
  
-Default: {"font-weight":"bold"}+Default: %%{"font-weight":"bold"}%%
 ==== mustTotalAmt ==== ==== mustTotalAmt ====
 **mustTotalAmt** is a numeric value that specifies what the constant sum must total to when **[[mfcssliders#mustTotalFlag|mustTotalFlag]]** is true. **mustTotalAmt** is a numeric value that specifies what the constant sum must total to when **[[mfcssliders#mustTotalFlag|mustTotalFlag]]** is true.
Line 76: Line 75:
 **prefix** is text that is shown before numeric values. **prefix** is text that is shown before numeric values.
  
-Default: ""+Default: %%""%%
 ==== suffix ==== ==== suffix ====
 **suffix** is text that is show after numeric values. **suffix** is text that is show after numeric values.
  
-Default: "%"+Default: %%"%"%%
 ==== widths ==== ==== widths ====
 **widths** is the width of the constant sum numbers in ems. An 'em' is the width of a wide character (i.e., M). **widths** is the width of the constant sum numbers in ems. An 'em' is the width of a wide character (i.e., M).
mfcssliders.1666029139.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki