User Tools

Site Tools


csmaddtotals

This is an old revision of the document!


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.

Here is an example that adds row totals:

Here is an example that adds columns total with grand total turned off:

Functionality includes:

  • Optionally display grand total
  • Supports back button
  • Automatically supports before and after symbols
  • Automatically supports translations

This function is available for a reasonable fee. Contact TomG on the Qualtrics Community to learn more.

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: 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 → and paste the provided csmAddTotals function JS:

<script>/*Paste csmAddTotals function JS here*/</script>

Alternatively, paste the mfCsSliders function JS into a question's JS outside the existing Qualtrics functions to make it available to questions on the page.

JavaScript Function Call

Add JS to call the mfCsSliders function to apply it to the Slider question as follows:

Qualtrics.SurveyEngine.addOnload(function() {
	csmAddTotals(this);
});

To override the default options, specify the desired options in the second function argument as an object. For example:

Qualtrics.SurveyEngine.addOnload(function() {
	csmAddTotals(this,{grandTotal:false});
});

Question Settings

  • Matrix
  • Matrix Type: Constant Sum
  • Add Total Box: On

Options

grandTotal

grandTotal is a boolean that specifies if a grand total should be displayed.

Default: true

Qualtrics Wiki

csmaddtotals.1666458707.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki