User Tools

Site Tools


cleavecsm

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
cleavecsm [2022/09/28 20:43] – [cleaveCSM - Format numbers as they are typed in a constant sum matrix question] admincleavecsm [2023/03/09 11:58] (current) admin
Line 6: Line 6:
 ===== 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 28: 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 37: 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 57: 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 73: Line 72:
 CSS style selector for input boxes to format (e.g., specific columns). 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.
cleavecsm.1664412205.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki