User Tools

Site Tools


slidernumformat

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
slidernumformat [2024/08/22 08:46] – [format] adminslidernumformat [2025/02/13 07:25] (current) – [Add Function To Survey] admin
Line 8: Line 8:
   * Scientific (e.g., 1.000E3)   * Scientific (e.g., 1.000E3)
   * Compact (e.g., $1K)   * Compact (e.g., $1K)
 +
 +sliderNumFormat works with all Qualtrics layouts including "New Survey Experience" (aka Simple layout).
  
 Here is a simple example:\\ Here is a simple example:\\
Line 14: Line 16:
 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/XMcommunity/messages/add/TomG|TomG]]** on the Qualtrics Community to learn more.
 ===== Set-up Instructions ===== ===== Set-up Instructions =====
-==== Add Function To Survey ====+==== Survey Header ==== 
 +=== Add jQuery (only if using New Survey Experience) === 
 +<code> 
 +<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"> 
 +</code> 
 +=== Add sliderNumFormat Function ===
 Add the sliderNumFormat 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 sliderNumFormat function JS: Add the sliderNumFormat 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 sliderNumFormat function JS:
 <code> <code>
Line 36: Line 43:
 ===== Options ===== ===== Options =====
 ==== format ==== ==== format ====
-**format** is a object used to specify the Intl.NumberFormat formatting options. Options are specified the same way as in the **[[https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat|Intl.NumberFormat()]]** options object.  **format** applies to both scale and value numbers.+**format** is a object used to specify the Intl.NumberFormat() formatting options. Options are specified the same way as in the **[[https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat|Intl.NumberFormat()]]** options object.  **format** applies to both scale and value numbers.
  
 Default: {} (empty, use Intl.NumberFormat() option defaults) Default: {} (empty, use Intl.NumberFormat() option defaults)
Line 44: Line 51:
 Default: %%"en-US"%% Default: %%"en-US"%%
 ==== valueFormat ==== ==== valueFormat ====
-**valueFormat** is an object that specifies the Intl.NumberFormat() formatting options for value numbers. Options are specified the same way as in the Intl.NumberFormat() options object. If the same option is included in the **[[sliderNumFormat#format|format]]** option the **valueFormat** option takes precedence. +**valueFormat** is an object that specifies the Intl.NumberFormat() formatting options for value numbers. Options are specified the same way as in the **[[https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat|Intl.NumberFormat()]]** options object. If the same option is included in the **[[sliderNumFormat#format|format]]** option the **valueFormat** option takes precedence. 
  
 Default: {} Default: {}
 ==== scaleFormat ==== ==== scaleFormat ====
-**scaleFormat** is an object that specifies the Intl.NumberFormat() formatting options for scale numbers. Options are specified the same way as in the Intl.NumberFormat options object. If the same option is included in the **[[sliderNumFormat#format|format]]** option the **scaleFormat** option takes precedence. +**scaleFormat** is an object that specifies the Intl.NumberFormat() formatting options for scale numbers. Options are specified the same way as in the **[[https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat|Intl.NumberFormat()]]** options object. If the same option is included in the **[[sliderNumFormat#format|format]]** option the **scaleFormat** option takes precedence. 
  
 Default: {} Default: {}
 ====== Qualtrics Wiki ====== ====== Qualtrics Wiki ======
 [[start|Qualtrics Wiki]] [[start|Qualtrics Wiki]]
slidernumformat.1724330810.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki