cleavecsm
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| cleavecsm [2022/09/28 20:43] – [cleaveCSM - Format numbers as they are typed in a constant sum matrix question] admin | cleavecsm [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. | Add the cleaveCSM function to the survey header to make it available to any question in the survey. | ||
| < | < | ||
| Line 28: | Line 27: | ||
| ===== Options ===== | ===== Options ===== | ||
| ==== align ==== | ==== align ==== | ||
| - | **align** specifies the alignment of the number within the text entry box. Possible value are " | + | **align** specifies the alignment of the number within the text entry box. Possible value are %%" |
| - | Default: " | + | Default: |
| ==== cleaveparms ==== | ==== cleaveparms ==== | ||
| **cleaveparms** is an object that specifies the cleave parameters. See [[https:// | **cleaveparms** is an object that specifies the cleave parameters. See [[https:// | ||
| 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: "" | + | Default: |
| === 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: "" | + | Default: |
| ==== width ==== | ==== width ==== | ||
| The width of the input boxes. If empty, the question' | The width of the input boxes. If empty, the question' | ||
| - | Default: "" | + | Default: |
| ==== 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
