madlibs
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| madlibs [2023/09/24 16:40] – [qMadLib - Fill-in-the-blank, MadLib, or Cloze type questions] admin | madlibs [2025/01/29 20:16] (current) – [Input Attributes] admin | ||
|---|---|---|---|
| Line 77: | Line 77: | ||
| ==== Series of Questions ==== | ==== Series of Questions ==== | ||
| - | As an alternative to a Side-by-side question, a series of separate questions may be used. The first question must be a Descriptive | + | As an alternative to a Side-by-side question, a series of separate questions may be used. The first question must be a Text/ |
| - | After the descriptive text question with fill-in elements, add text entry and/or multiple choice dropdown questions to match. There must be the __same number__ of text entry and/or multiple choice dropdown questions as there are fill-in-the-blanks in the Madlib. The questions __must__ be in the __same order__ as the fill-in-the-blank inputs (text inputs and drop downs). | + | After the Text/ |
| === Drop Down === | === Drop Down === | ||
| Line 88: | Line 88: | ||
| ==== JavaScript Function Call ==== | ==== JavaScript Function Call ==== | ||
| - | Add JS to either the Side-by-Side question or the Descriptive | + | Add JS to either the Side-by-Side question or the Text/ |
| < | < | ||
| Qualtrics.SurveyEngine.addOnReady(function() { | Qualtrics.SurveyEngine.addOnReady(function() { | ||
| Line 125: | Line 125: | ||
| < | < | ||
| </ | </ | ||
| - | An embedded data field is used so opacity style does not impact 'View response' | + | An embedded data field is used so opacity style does not impact |
| + | < | ||
| + | </ | ||
| === Text Input === | === Text Input === | ||
| Line 147: | Line 149: | ||
| === class === | === class === | ||
| - | The following **class** names can be used to format or configure a MadLib input. class=%%" | + | The following **class** names can be used to format or configure a MadLib input. class=%%" |
| == cleaveRaw == | == cleaveRaw == | ||
| - | The **cleaveRaw** class only applies to a cleave field with numeric formatting. When cleaveRaw is included, the raw value instead of the formatted value of the input is saved in Qualtrics. | + | The **cleaveRaw** class only applies to a cleave field with numeric formatting. When cleaveRaw is included, the raw value instead of the formatted value of the input is saved in Qualtrics. Applies to input elements only. |
| == decimal == | == decimal == | ||
| - | The **decimal** class applies an input mask to an open end Madlib input so only valid decimal values may be entered. **decimal** is ignored if cleave or flatpickr is used. | + | The **decimal** class applies an input mask to an open end Madlib input so only valid decimal values may be entered. **decimal** is ignored if cleave or flatpickr is used. Applies to input elements only. |
| == fillin == | == fillin == | ||
| The **fillin** class is __required__ for all MadLibs input or select elements. | The **fillin** class is __required__ for all MadLibs input or select elements. | ||
| == integer == | == integer == | ||
| - | The **integer** class applies an input mask to an open end Madlib input so only valid integer values may be entered. **integer** is ignored if cleave or flatpickr is used. | + | The **integer** class applies an input mask to an open end Madlib input so only valid integer values may be entered. **integer** is ignored if cleave or flatpickr is used. Applies to input elements only. |
| == lower == | == lower == | ||
| - | The **lower** class applies an input mask to an open end Madlib input so all letters are converted to lowercase. **lower** is ignored if cleave or flatpickr is used. | + | The **lower** class applies an input mask to an open end Madlib input so all letters are converted to lowercase. **lower** is ignored if cleave or flatpickr is used. Applies to input elements only. |
| == nospinner == | == nospinner == | ||
| - | The **nospinner** class hides the up/down arrows (spinner) associated with %%type=" | + | The **nospinner** class hides the up/down arrows (spinner) associated with %%type=" |
| == proper == | == proper == | ||
| - | The **proper** class applies an input mask to an open end Madlib input so the first letter of each word is capitalized. **proper** is ignored if cleave or flatpickr is used. | + | The **proper** class applies an input mask to an open end Madlib input so the first letter of each word is capitalized. **proper** is ignored if cleave or flatpickr is used. Applies to input elements only. |
| + | == s2off == | ||
| + | The **s2off** class disables select2 on select elements. Use of the s2off class does not support the placeholder attribute. Applies to select elements only. | ||
| == upper == | == upper == | ||
| - | The **upper** class applies an input mask to an open end Madlib input so all letters are converted to uppercase. **upper** is ignored if cleave or flatpickr is used. | + | The **upper** class applies an input mask to an open end Madlib input so all letters are converted to uppercase. **upper** is ignored if cleave or flatpickr is used. Applies to input elements only. |
| == wholenum == | == wholenum == | ||
| - | The **wholenum** class applies an input mask to an open end Madlib input so only valid whole number values may be entered. **wholenum** is ignored if cleave or flatpickr is used. | + | The **wholenum** class applies an input mask to an open end Madlib input so only valid whole number values may be entered. **wholenum** is ignored if cleave or flatpickr is used. Applies to input elements only. |
| === data-cleave === | === data-cleave === | ||
| - | The **data-cleave** attribute specifies that cleave should be used for input masking. The value is a json string that specifies the [[https:// | + | The **data-cleave** attribute specifies that cleave should be used for input masking. It applies to input elements only. The value is a json string that specifies the [[https:// |
| < | < | ||
| data-cleave=' | data-cleave=' | ||
| Line 174: | Line 178: | ||
| === data-flatpickr === | === data-flatpickr === | ||
| - | The **data-flatpickr** attribute specifies that flatpickr should be used to pick a date and/or time. The value is a json string that specifies the [[https:// | + | The **data-flatpickr** attribute specifies that flatpickr should be used to pick a date and/or time. It applies to input elements only. The value is a json string that specifies the [[https:// |
| < | < | ||
| data-flatpickr=' | data-flatpickr=' | ||
| Line 180: | Line 184: | ||
| === inputmode === | === inputmode === | ||
| - | The **inputmode** attribute can be used to specify the type of on-screen keyboard that is shown when a MadLib text input gains focus. For example, inputmode=" | + | The **inputmode** attribute can be used to specify the type of on-screen keyboard that is shown when a MadLib text input gains focus. For example, inputmode=%%" |
| === maxlength === | === maxlength === | ||
| - | The **maxlength** attribute can be used to specify the maximum number of characters for an input field. | + | The **maxlength** attribute can be used to specify the maximum number of characters for an input field. Applies to input elements only. |
| === placeholder === | === placeholder === | ||
| - | The **placeholder** attribute is optional, but important. It contains instructional text that is shown in a MadLib input with a empty value. The length of the text determines the initial size of the input field. | + | The **placeholder** attribute is optional, but important. It contains instructional text that is shown in a MadLib input with a empty value. The length of the text determines the initial size of the input field. Does not apply to select elements with the class **[[madlibs# |
| === type === | === type === | ||
| Line 193: | Line 197: | ||
| **type=%%" | **type=%%" | ||
| == number == | == number == | ||
| - | **type=%%" | + | **type=%%" |
| ==== Word Completion ==== | ==== Word Completion ==== | ||
madlibs.1695588036.txt.gz · Last modified: by admin
