User Tools

Site Tools


cleavecsm

Differences

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

Link to this comparison view

Next revision
Previous revision
cleavecsm [2021/11/14 11:45] – created admincleavecsm [2023/03/09 11:58] (current) admin
Line 1: Line 1:
 ====== cleaveCSM - Format numbers as they are typed in a constant sum matrix question ====== ====== cleaveCSM - Format numbers as they are typed in a constant sum matrix question ======
-The cleaveCSM function uses cleave.js to automatically format numeric fields with thousand separators, decimals, currency symbols, etc. in a constant sum matrix. Since a constant sum matrix doesn'except non-numeric inputs (i.e., formatted numbers) cleaveCSM converts the formatted numbers to numeric behind the scenes.+The cleaveCSM function uses cleave.js to automatically format numeric fields with thousand separators, decimals, currency symbols, etc. in a constant sum matrix. Since a constant sum matrix doesn'accept non-numeric inputs (i.e., formatted numbers) cleaveCSM converts the formatted numbers to numeric behind the scenes
 + 
 +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 =====
 ==== 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 cleaveCSM 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 cleaveCSM function JS: Add the cleaveCSM 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 cleaveCSM function JS:
 <code> <code>
Line 26: Line 27:
 ===== Options ===== ===== Options =====
 ==== align ==== ==== align ====
-**align** specifies the alignment of the number within the text entry box. Possible value are "left", "right", and "center".+**align** specifies the alignment of the number within the text entry box. Possible value are %%"left"%%%%"right"%%, and %%"center"%%.
  
-Default: "right"+Default: %%"right"%%
 ==== cleaveparms ==== ==== cleaveparms ====
 **cleaveparms** is an object that specifies the cleave parameters. See [[https://github.com/nosir/cleave.js|cleave.js]] for more details. **cleaveparms** is an object that specifies the cleave parameters. See [[https://github.com/nosir/cleave.js|cleave.js]] for more details.
Line 35: Line 36:
 The thousands separator as a string. The thousands separator as a string.
  
-Default ","+Default %%","%%
 === cleaveparm: prefix === === cleaveparm: prefix ===
 The number prefix as a string, such as a currency symbol. The number prefix as a string, such as a currency symbol.
  
-Default: "" (none)+Default: %%""%% (none)
 === cleavparm: noImmediatePrefix === === cleavparm: noImmediatePrefix ===
 Boolean to not show prefix until a number is entered. Boolean to not show prefix until a number is entered.
Line 55: Line 56:
 The decimal symbol as a string. The decimal symbol as a string.
  
-Default: "."+Default: %%"."%%
 === cleaveparm: numeralPositiveOnly === === cleaveparm: numeralPositiveOnly ===
 Boolean to allow positive numbers only. Boolean to allow positive numbers only.
Line 69: Line 70:
 Default: false Default: false
 ==== selector ==== ==== selector ====
-CSS style selector for input boxes to format. If empty, all constant sum input boxes are formatted.+CSS style selector for input boxes to format (e.g., specific columns). If empty, all constant sum input boxes are formatted.
  
-Default: "" (empty)+Default: %%""%% (empty)
 ==== width ==== ==== width ====
 The width of the input boxes. If empty, the question's default width is used. The width of the input boxes. If empty, the question's default width is used.
  
-Default: "" (empty)+Default: %%""%% (empty)
 ==== zeroBlank ==== ==== zeroBlank ====
 Boolean to show zeros (the default input value in constant sum matrices) as blank. Boolean to show zeros (the default input value in constant sum matrices) as blank.
  
 Default: false Default: false
 +====== Qualtrics Wiki ======
 +[[start|Qualtrics Wiki]]
  
  
cleavecsm.1636908302.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki