csmaddtotals
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| csmaddtotals [2022/10/22 13:11] – created admin | csmaddtotals [2023/10/28 16:42] (current) – [grandMustTotal] admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== csmAddTotals - Constant sum matrix with row and column totals ====== | ====== csmAddTotals - Constant sum matrix with row and column totals ====== | ||
| - | The **csmAddTotals** function adds row or column totals to a constant sum matrix. If the question is configured to show row totals, csmAddTotals automatically adds column totals. If the question is configured to show column totals, csmAddTotals automatically adds row totals. | + | The **csmAddTotals** function adds row or column totals to a constant sum matrix. If the question is configured to show row totals, csmAddTotals automatically adds column totals. If the question is configured to show column totals, csmAddTotals automatically adds row totals. |
| - | + | ||
| - | Here is an example that adds row totals:\\ | + | |
| - | {{ :: | + | |
| - | + | ||
| - | Here is an example that adds columns total with grand total turned off:\\ | + | |
| - | {{ :: | + | |
| Functionality includes:\\ | Functionality includes:\\ | ||
| * Optionally display grand total | * Optionally display grand total | ||
| + | * Optionally require a specific grand total | ||
| * Supports back button | * Supports back button | ||
| * Automatically supports before and after symbols | * Automatically supports before and after symbols | ||
| * Automatically supports translations | * Automatically supports translations | ||
| - | This function is available for a reasonable fee. Contact **[[https:// | + | Here is an example that adds row totals:\\ |
| + | {{ :: | ||
| + | |||
| + | Here is an example that adds column totals with grand total turned off:\\ | ||
| + | {{ :: | ||
| + | |||
| + | This function is available for a reasonable fee. Contact **[[https:// | ||
| ===== 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 csmAddTotals function to the survey header to make it available to any question in the survey. Go to Look & Feel -> General -> Header edit -> {{:: |
| - | Add the csmAddTotals function to the survey header to make it available to any question in the survey. | + | |
| < | < | ||
| < | < | ||
| </ | </ | ||
| - | Alternatively, | + | Alternatively, |
| ==== JavaScript Function Call ==== | ==== JavaScript Function Call ==== | ||
| - | Add JS to call the mfCsSliders | + | Add JS to call the csmAddTotals |
| < | < | ||
| Qualtrics.SurveyEngine.addOnload(function() { | Qualtrics.SurveyEngine.addOnload(function() { | ||
| Line 41: | Line 41: | ||
| * Matrix Type: Constant Sum | * Matrix Type: Constant Sum | ||
| * Add Total Box: On | * Add Total Box: On | ||
| - | |||
| ===== Options ===== | ===== Options ===== | ||
| ==== grandTotal ==== | ==== grandTotal ==== | ||
| Line 47: | Line 46: | ||
| Default: true | Default: true | ||
| + | ==== grandMustTotal ==== | ||
| + | **grandMustTotal** is a number greater than 0 (zero) that the grand total must add to when **[[csmaddtotals# | ||
| + | |||
| + | Default: 0 | ||
| ====== Qualtrics Wiki ====== | ====== Qualtrics Wiki ====== | ||
| [[start|Qualtrics Wiki]] | [[start|Qualtrics Wiki]] | ||
csmaddtotals.1666458707.txt.gz · Last modified: by admin
