====== mcSelectAll - Select/Deselect all non-exclusive choices in a multi-select multiple choice question ====== The **mcSelectAll** function changes a choice in a multi-select multiple choice to a 'Select all/Deselect all' choice. Features include: * Select all/Deselect all choice can be placed in any order (first, last, etc.) * Dynamic choice text * Works with any alignment (vertical, horizontal, column) * Compatible with exclusive choices * Compatible with back button * Translation friendly Here is a quick video demonstration:\\ {{ ::mcSelectAll.mp4?650 |mcSelectAll Demonstration}} To select all answers in a multi-select matrix question see **[[matrixselectall|matrixSelectAll]]**. This function is available for a reasonable fee. Contact **[[https://community.qualtrics.com/inbox/conversation?with=373]]** on the Qualtrics Community to learn more. ===== Set-up Instructions ===== ==== Survey Header ==== Add the mcSelectAll 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 mcSelectAll function JS: Alternatively, paste the mcSelectAll function JS into a question's JS outside the existing Qualtrics functions to make it available to questions on the page. ==== Select/Deselect All Choice Setup ==== To specify the Select all/Deselect all choice, put the choice text inside a span with the class ''selectAll'' (''selectAll'' is the default class and can be changed in **[[mcselectall#options|options]]**). For example: All of these //Please note:// The choice text displayed to the respondent is specified in the **[[mcselectall#selectText|selectText]]** and **[[mcselectall#deselectText|deselectText]]** options. The choice text inside the selectAll span is NOT displayed. === Question JavaScript === Add JS to call the mcSelectAll function to apply it to the multiple choice question as follows: Qualtrics.SurveyEngine.addOnload(function() { mcSelectAll(this); }); To override the default options, specify the desired **[[mcselectall#options|options]]** is the second function argument as an object. For example: Qualtrics.SurveyEngine.addOnload(function() { mcSelectAll(this,{selectText:'All the above',deselectText:'Deselect all the above'}); }); ===== Options ===== ==== deselectText ==== The choice text displayed when the Select/Deselect all choice is selected. Default: %%"Deselect all of these"%% ==== selectClass ==== The html class name of the span used to identify the Select/Deselect all choice. See **[[mcselectall#select_deselect_all_choice_setup|Select/Deselect All Choice Setup]]**. Default: %%"selectAll"%% ==== selectText ==== The choice text displayed when the Select/Deselect all choice is NOT selected. Default: %%"All of these"%% ====== Qualtrics Wiki ====== [[start|Qualtrics Wiki]]