User Tools

Site Tools


ddautocomplete

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ddautocomplete [2023/02/08 17:49] – ddautocomplete_-_automatically_select_and_optionally_hide_drop_downs_with_one_choice renamed to ddautocomplete adminddautocomplete [2023/09/24 16:44] (current) – [ddAutoComplete - Automatically select and optionally hide drill down selects (drop downs) with one choice] admin
Line 1: Line 1:
-====== ddAutoComplete - Automatically select and optionally hide drop downs with one choice ====== +====== ddAutoComplete - Automatically select and optionally hide drill down selects (drop downswith 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.+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:\\ +Here is a quick video demonstration with the hide option enabled:\\ 
-{{ ::mcSelectAll.mp4?650 |mcSelectAll Demonstration}}+{{ ::ddAutoComplete.mp4?650 |ddAutoComplete Demonstration}}
  
-This function is available for a reasonable fee. Contact **[[https://community.qualtrics.com/XMcommunity/messages/add/TomG|TomG]]** on the Qualtrics Community to learn more.+Here is a demonstration of the same question the hide option disabled:\\ 
 +{{ ::ddAutoComplete_nohide.mp4?650 |ddAutoComplete Demonstration}} 
 + 
 +This function is available for a reasonable fee. Contact **[[https://community.qualtrics.com/inbox/conversation?with=373|TomG]]** on the Qualtrics Community to learn more.
 ===== Set-up Instructions ===== ===== Set-up Instructions =====
 ==== Survey Header ==== ==== 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:+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 -> {{::icon_source.jpg?20|}} and paste the provided ddAutoComplete function JS:
 <code> <code>
-<script>/*Paste mcSelectAll function JS here*/</script>+<script>/*Paste ddAutoComplete function JS here*/</script>
 </code> </code>
-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+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.
-==== 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: +
-<code> +
-<span class="selectAll">All of these</span> +
-</code> +
-//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 === === Question JavaScript ===
-Add JS to call the mcSelectAll function to apply it to the multiple choice question as follows:+Add JS to call the ddAutoSelect function to apply it to the drill down question as follows:
 <code> <code>
 Qualtrics.SurveyEngine.addOnload(function() { Qualtrics.SurveyEngine.addOnload(function() {
- mcSelectAll(this);+ ddAutoComplete(this);
 }); });
 </code> </code>
  
-To override the default options, specify the desired **[[mcselectall#options|options]]** is the second function argument as an object. For example:+To override the default options, specify the desired **[[ddAutoComplete#options|options]]** is the second function argument as an object. For example:
 <code> <code>
 Qualtrics.SurveyEngine.addOnload(function() { Qualtrics.SurveyEngine.addOnload(function() {
- mcSelectAll(this,{selectText:'All the above',deselectText:'Deselect all the above'});+ ddAutoComplete(this,{hide:false});
 }); });
 </code> </code>
 ===== Options ===== ===== Options =====
-==== deselectText ==== +==== hide ==== 
-The choice text displayed when the Select/Deselect all choice is selected.  +A boolean to enable the hiding of selects (drop downs) with one choice (option)
- +
-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'+Default: true
 ====== Qualtrics Wiki ====== ====== Qualtrics Wiki ======
 [[start|Qualtrics Wiki]] [[start|Qualtrics Wiki]]
ddautocomplete.1675896589.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki