uncheckradios
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| uncheckradios [2023/08/28 12:58] – admin | uncheckradios [2024/08/23 10:03] (current) – admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== uncheckRadios - Deselect radio buttons on any question type that contains radio buttons | ====== uncheckRadios - Deselect radio buttons on any question type that contains radio buttons | ||
| - | The uncheckRadios function deselects radio buttons in question types that use them: multiple choice, nps, matrix, side-by-side, | + | The uncheckRadios function deselects radio buttons in question types that use them: multiple choice, nps, matrix, side-by-side, |
| Functionality includes: | Functionality includes: | ||
| - | * Works on any question type with radio buttons | + | * Works on any question type with radio buttons: Multiple Choice, Matrix, Side-by-Side, |
| * On click functionality to deselect a selected radio button by clicking on it | * On click functionality to deselect a selected radio button by clicking on it | ||
| * On demand functionality to deselect one or more radio buttons immediately | * On demand functionality to deselect one or more radio buttons immediately | ||
| * Can be applied globally, by page, by question, or on specific radio buttons or groups of radio buttons (e.g., one column of a side-by-side) | * Can be applied globally, by page, by question, or on specific radio buttons or groups of radio buttons (e.g., one column of a side-by-side) | ||
| - | This function is available for a reasonable fee. Contact **[[https:// | + | Here is a quick video demonstration: |
| + | {{ :: | ||
| + | |||
| + | This function is available for a reasonable fee. Contact **[[https:// | ||
| ===== Set-up Instructions ===== | ===== Set-up Instructions ===== | ||
| Line 17: | Line 20: | ||
| </ | </ | ||
| Alternatively, | Alternatively, | ||
| - | ==== Multiple Choice Question | + | ==== JavaScript Function Call ==== |
| - | === Question Settings === | + | The uncheckRadios function can be invoked |
| - | Any " | + | |
| - | + | ||
| - | If " | + | |
| - | === Question JavaScript === | + | |
| - | Add JS to call the mcAlphabetize | + | |
| < | < | ||
| Qualtrics.SurveyEngine.addOnload(function() { | Qualtrics.SurveyEngine.addOnload(function() { | ||
| - | mcAlphabetize(this); | + | uncheckRadios(); |
| }); | }); | ||
| </ | </ | ||
| - | + | To override the default options, specify the desired options | |
| - | For anchored choices, use the **[[mcalphabetize# | + | |
| < | < | ||
| Qualtrics.SurveyEngine.addOnload(function() { | Qualtrics.SurveyEngine.addOnload(function() { | ||
| - | mcAlphabetize(this,{anchors:[7,8]}); | + | var radios = jQuery("#" |
| + | uncheckRadios({radios:radios,onclick: | ||
| }); | }); | ||
| + | </ | ||
| + | === Global === | ||
| + | To be able to globally deselect radio buttons (i.e., throughout the entire survey) by clicking on them, call the uncheckRadios function from the survey header or footer with the onclick option set to true: | ||
| + | < | ||
| + | < | ||
| + | Qualtrics.SurveyEngine.addOnload(function() { | ||
| + | uncheckRadios({onclick: | ||
| + | }); | ||
| + | </ | ||
| </ | </ | ||
| ===== Options ===== | ===== Options ===== | ||
| - | ==== anchors | + | ==== radios |
| - | **anchors** specifies the array of choice ids that should be anchored | + | **radios** specifies the radio buttons |
| - | + | ||
| - | For multi-select boxes, the choice ids are specified as " | + | |
| - | To identify choice ids, preview the question and use the Inspect feature of your browser. | + | Default: %%" |
| + | ==== onclick ==== | ||
| + | **onclick** specifies if radio buttons should be deselected on click (true) or immediately (false). | ||
| - | Default: | + | Default: |
| ====== Qualtrics Wiki ====== | ====== Qualtrics Wiki ====== | ||
| [[start|Qualtrics Wiki]] | [[start|Qualtrics Wiki]] | ||
uncheckradios.1693241889.txt.gz · Last modified: by admin
