User Tools

Site Tools


ddautocomplete

This is an old revision of the document!


ddAutoComplete - Automatically select and optionally hide drop downs with one choice

The ddAutoComplete function automatically selects and optionally hides drill down selects (drop downs) with one option. It automatically detects the number of selects and their options – just add the function call to a drill down question and that's it.

Here is a quick video demonstration:

This function is available for a reasonable fee. Contact TomG 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 → and paste the provided mcSelectAll function JS:

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

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 options). For example:

<span class="selectAll">All of these</span>

Please note: The choice text displayed to the respondent is specified in the selectText and 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 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 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

ddautocomplete.1675896589.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki