Thomas Gibbons Consulting Qualtrics Wiki

Contact TomG on Qualtrics Community

User Tools

Site Tools


ddautocomplete

ddAutoComplete - Automatically select and optionally hide drill down selects (drop downs) with one choice

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

Here is a quick video demonstration with the hide option enabled:

Here is a demonstration of the same question the hide option disabled:

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

Set-up Instructions

Survey Header

Add the ddAutoComplete 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 ddAutoComplete function JS:

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

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

Question JavaScript

Add JS to call the ddAutoSelect function to apply it to the drill down question as follows:

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

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

Qualtrics.SurveyEngine.addOnload(function() {
	ddAutoComplete(this,{hide:false});
});

Options

hide

A boolean to enable the hiding of selects (drop downs) with one choice (option).

Default: true

Qualtrics Wiki

ddautocomplete.txt · Last modified: 2023/09/24 15:44 by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki