skipfollowup
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
skipfollowup [2020/12/20 10:38] – [Add Function To Survey] admin | skipfollowup [2025/09/07 18:38] (current) – admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== skipFollowUp - Automatically Answer a Follow-up Question with One Choice | + | ====== skipFollowUp - Replaced by autoAnswer |
- | The **skipfollowup** function | + | The **skipfollowup** function |
- | | + | ====== Qualtrics |
- | | + | [[start|Qualtrics |
- | * Rank Order (text entry) | + | |
- | + | ||
- | It includes support for: | + | |
- | * Previous button (see Previous Button Support) | + | |
- | * Constant sums of any total | + | |
- | ===== Set-up Instructions ===== | + | |
- | ==== 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. Go to Look & Feel -> General -> Header edit -> {{:: | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | Alternatively, | + | |
- | ==== skipFollowUp Question | + | |
- | The skipFollowUp question can be a Multiple Choice, Constant Sum (text entry or slider) or Rank Order (text entry) question. A skipFollowUp question must be the ONLY answerable question on the page. | + | |
- | ==== JavaScript Function Call ==== | + | |
- | Add JS to call the skipFollowUp function to apply it to the follow-up question as follows: | + | |
- | < | + | |
- | Qualtrics.SurveyEngine.addOnload(function() { | + | |
- | skipFollowUp(this); | + | |
- | }); | + | |
- | </ | + | |
- | + | ||
- | To override the default options, specify the desired options in the second function argument as an object. For example: | + | |
- | < | + | |
- | Qualtrics.SurveyEngine.addOnload(function() { | + | |
- | skipFollowUp(this, | + | |
- | }); | + | |
- | </ | + | |
- | ==== Previous Button Support | + | |
- | To support the Previous Button, add this JS to the question that immediately follows the follow-up question: | + | |
- | < | + | |
- | Qualtrics.SurveyEngine.addOnReady(function() { | + | |
- | //Script for the page after the skipFollowUp() to hide Previous button if previous question had one answer. | + | |
- | var noPrevFlag = " | + | |
- | if(noPrevFlag == " | + | |
- | }); | + | |
- | </ | + | |
- | Where the embedded variable name matches the name of the noPrevFlag option in the skipFollowUp function call. | + | |
- | ===== Options ===== | + | |
- | ==== noPrevFlag ==== | + | |
- | **noPrevFlag** is that name of the embedded variable that will be used to hide or show the Previous Button on the next page following the skipFollowUp question. | + | |
- | + | ||
- | Default: "" | + | |
- | ==== hideClass ==== | + | |
- | **hideClass** specifies the class name of the element used to add space above the question while the script executes. | + | |
- | + | ||
- | Default: " | + | |
- | ==== csumTotal ==== | + | |
- | **csumTotal** specifies the total amount for constant sum questions. | + | |
- | + | ||
- | Default: " | + | |
skipfollowup.1608478687.txt.gz · Last modified: by admin