Thomas Gibbons Consulting Qualtrics Wiki

Contact TomG on Qualtrics Community

User Tools

Site Tools


cfcgs

cfcgsSave/cfcgsAdd - Carry forward choice groups

The cfcgsSave and cfcgsAdd functions work together to enable carry forward of choice groups for any combination of multiple choice and matrix questions. The cfcgsSave function saves the choice group data from the original question and the cfcgsAdd function adds groups to the question with carry forward.

Features:

  • Retains randomized order of choice groups and choices
  • Only displays carry forward choice groups containing displayed choices or statements
  • Supports any combination of multiple choice and matrix questions in any order
  • Compatible with:

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

Set-up Instructions

Add Functions To Survey

To make the functions 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 → and paste the provided cfcgsSave/cfcgsAdd function JS:

<script>/*Paste cfcgsSave/cfcgsAdd functions JS here*/</script>

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

cfcgsSave Function Call

Add JS to call the cfcgsSave function from the original question where the choice groups are defined. Specify the name of an embedded data field the will contain carry forward data. Do NOT add the embedded data field to the survey flow (it is for temporary use only). If an embedded data field name is not specified the embedded data field QIDx_cfcgs will be used where QIDx is the question id.

Qualtrics.SurveyEngine.addOnload(function() {
	cfcgsSave(this,"Q1_cfcgs");
});

cfcgsAdd Function Call

Add JS to call the cfcgsAdd function from the questions that include the carry forward choices (aka Matrix statements). Specify the name of the embedded data field used it the previous cfcgsSave function call.

Qualtrics.SurveyEngine.addOnload(function() {
	cfcgsAdd(this,"Q1_cfcgs");
});

Qualtrics Wiki

cfcgs.txt · Last modified: 2023/09/25 08:30 by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki