User Tools

Site Tools


mcalphabetize

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
mcalphabetize [2022/09/28 20:48] – [Multiple Choice Question] adminmcalphabetize [2024/02/07 17:52] (current) – [langs] admin
Line 4: Line 4:
 Functionality includes: Functionality includes:
   * Works with vertical single answer, vertical multi-answer, dropdown list, select box and multi-select box   * Works with vertical single answer, vertical multi-answer, dropdown list, select box and multi-select box
-  * Alphabetizes based on current language+  * Alphabetizes based on the current language
   * Supports anchoring of choices to the bottom of the list   * Supports anchoring of choices to the bottom of the list
   * Compatible with **[[mccolumns|mcColumns]]** (a multiple choice responsive columns function)   * Compatible with **[[mccolumns|mcColumns]]** (a multiple choice responsive columns function)
Line 10: Line 10:
 mcAlphabetize currently does **not** support choice groups. mcAlphabetize currently does **not** support choice groups.
  
-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.+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
 + 
 +To alphabetize options in side-by-side dropdowns on-the-fly, see **[[sbsSelectAlphabetize|sbsSelectAlphabetize]]**. To alphabetize drill-down dropdowns on-the-fly, see **[[ddAlphabetize|ddAlphabetize]]**.
  
 ===== Set-up Instructions ===== ===== Set-up Instructions =====
 ==== Survey Header ==== ==== Survey Header ====
-To make the function available to all questions in the survey, copy the function to the Survey Header inside a script tag: 
 Add the mcAlphabetize 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 mcAlphabetize function JS: Add the mcAlphabetize 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 mcAlphabetize function JS:
 <code> <code>
Line 24: Line 25:
 Any "Answers" setting is valid. Any "Answers" setting is valid.
  
-If "Answers" is set to either "Single Answer" or "Multiple Answer", "Position" should be set to "Vertical" (fully compatible with [[mccolumns|mcColumns]] if a column layout is desired).+If "Answers" is set to either "Single Answer" or "Multiple Answer", "Position" should be set to "Vertical" (fully compatible with **[[mccolumns|mcColumns]]** if a column layout is desired).
 === Question JavaScript === === Question JavaScript ===
 Add JS to call the mcAlphabetize function to apply it to the Multiple Choice question as follows: Add JS to call the mcAlphabetize function to apply it to the Multiple Choice question as follows:
Line 48: Line 49:
  
 Default: [] (nothing anchored) Default: [] (nothing anchored)
 +==== langs ====
 +**langs** is an object for mapping Qualtrics language codes to valid JavaScript locale languages for correct sorting. It is only needed if the Qualtrics language code doesn't resolve to a valid JavaScript locale language code. Of the built-in Qualtrics language only ZH-S (Simplified Chinese) and ZH-T (Traditional Chinese) don't resolve, but they are included in the **langs** object by default.
 +
 +If you have created your own language code, you made need to add your language to the langs object if it doesn't automatically resolve. A new language specification would look like %%langs:{"XX":"yy"}%%.
 +==== qlang ====
 +**qlang** is the Qualtrics language code string that should be used to do the alphabetization. By default, this is the current language of the survey. 
 +
 +Default: %%"${e://Field/Q_Language}"%%
 ====== Qualtrics Wiki ====== ====== Qualtrics Wiki ======
 [[start|Qualtrics Wiki]] [[start|Qualtrics Wiki]]
mcalphabetize.1664412527.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki