User Tools

Site Tools


sbsselectalphabetize

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
sbsselectalphabetize [2022/10/02 13:47] – [sbsSelectAlphabetize - Alphabetize selects (aka dropsdowns) within a Side-by-side on-the-fly] adminsbsselectalphabetize [2023/09/25 07:49] (current) admin
Line 1: Line 1:
-====== sbsSelectAlphabetize - Alphabetize selects (aka dropsdowns) within a Side-by-Side on-the-fly ====== +====== sbsSelectAlphabetize - Alphabetize selects (aka dropdowns) within a Side-by-Side on-the-fly ====== 
-The **sbsSelectAlphabetize** function arranges choices with side-by-side selects (aka dropdowns) into alphabetical order on-the-fly. It is useful for translated surveys where you want the choices in alphabetical order for every language. It is also useful if you don't want to manually alphabetize each time you add a choice dropdown within a side-by-side.+The **sbsSelectAlphabetize** function arranges choices with side-by-side selects (aka dropdowns) into alphabetical order on-the-fly. It is useful for translated surveys where you want the choices in alphabetical order for every language. It is also useful if you don't want to manually alphabetize each time you add a dropdown choice within a side-by-side.
  
 Functionality includes: Functionality includes:
   * Alphabetizes based on current language   * Alphabetizes based on current language
   * Supports anchoring of choices to the bottom of the list   * Supports anchoring of choices to the bottom of the list
-  * Can be used on any dropdown column in a side-by-side+  * Can be used on all dropdowns or specific dropdown columns in a side-by-side
  
-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 choices in multiple choice questions on-the-fly, see **[[mcAlphabetize|mcAlphabetize]]**.
  
 ===== Set-up Instructions ===== ===== Set-up Instructions =====
Line 25: Line 27:
 </code> </code>
  
-For anchored choices, use the **[[sbsSelectAlphabetize#anchors|anchors]]** option to specify the choice ids as an array in the order the choices should be listed. For example:+For anchored choices, use the **[[sbsSelectAlphabetize#anchors|anchors]]** option to specify the choice ids (i.e., option values) as an array in the order the choices should be listed. For example:
 <code> <code>
 Qualtrics.SurveyEngine.addOnload(function() { Qualtrics.SurveyEngine.addOnload(function() {
Line 33: Line 35:
 ===== Options ===== ===== Options =====
 ==== anchors ==== ==== anchors ====
-**anchors** specifies the array of choice ids that should be anchored to the bottom of the list.+**anchors** specifies the array of choice ids that should be anchored to the bottom of the list. Choice ids should be listed in the order they should be displayed.
  
-For multi-select boxes, the choice ids are specified as "QR~QIDxx~id" where 'QIDxx' is the QID of the question and 'id' is the choice idFor all other answer typesthe choice id is a number or a number preceded by 'x' for carry forward questions. +To identify choice ids (i.e., option values), preview the question and use the Inspect feature of your browser.
- +
-To identify choice ids, preview the question and use the Inspect feature of your browser.+
  
 Default: [] (nothing anchored) Default: [] (nothing anchored)
-==== lang ====+==== 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 valid JavaScript locale language code. Of the built-in Qualtrics languages, 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_Langauge}"%% Default: %%"${e://Field/Q_Langauge}"%%
 ==== select ==== ==== select ====
-Default: ".SBS1 select"+**select** is the css selector for the selects to be alpabetize.  By default all selects (dropdowns) in the Side-by-Side (SBS) will be alphabetized. To specify a specific SBS column add the column class before 'select'. For example to specify the first answer column use '.SBS1 select'
 +  
 +Default: %%"select"%%
 ====== Qualtrics Wiki ====== ====== Qualtrics Wiki ======
 [[start|Qualtrics Wiki]] [[start|Qualtrics Wiki]]
sbsselectalphabetize.1664732840.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki