-
Notifications
You must be signed in to change notification settings - Fork 23
CTATTextInput
jsewall edited this page Sep 1, 2023
·
14 revisions
This uses a <input type="text">
to add text input fields to a tutor. This is meant for short text inputs and will get submitted when an enter is pressed while it has focus.
<div id="text_input" class="CTATTextInput"></div>
-
id
: Required. The name of the component, must be a valid html id name. -
class
: Required. The class list, must includeCTATTextInput
and no other CTAT<component> classes. -
data-ctat-enabled
:true
orfalse
. Default istrue
. Controls if the component will accept student interaction. -
data-ctat-tutor
:true
orfalse
. Default istrue
. Controls if direct actions on the component trigger grading. -
data-ctat-show-feedback
:true
orfalse
. Default istrue
unlessdata-ctat-tutor="false"
. Determines if grading feedback is shown on the component. -
data-ctat-show-hint-highlight
:true
orfalse
. Default istrue
. Determines if hint highlighting is shown on the component. -
data-ctat-disable-on-correct
:true
orfalse
. Default istrue
. Determines if the component becomes locked when it is graded as correct. -
data-ctat-track-selection
: (experimental, in versions after 2023-09-01)true
orfalse
. Default isfalse
. If true, the component will generateselectText
actions when the user selects part of the text. -
autofocus
: component will start focused (only one should have this set) -
maxLength
: a number specifying the max number of characters that can be entered. -
value
: the value of the input.
In addition to the common Actions listed in Often Used TPAs this component supports the following actions:
Action | Input | Notes |
---|---|---|
UpdateTextField | a string | Modifies the value. |
.CTATTextInput { width: 100px; display: inline-block; }
.CTATTextInput>input[type="text"] {
width: inherit;
height: inherit;
font-size: inherit;
background-color: inherit;
}
Getting Started
Using CTAT
HTML Components
- HTML Examples
- CTATAudioButton
- CTATButton
- CTATChatPanel
- CTATCheckBox
- CTATComboBox
- CTATDoneButton
- CTATDragNDrop
- CTATFractionBar
- CTATGroupingComponent
- CTATHintButton
- CTATHintWindow
- CTATImageButton
- CTATJumble
- CTATNumberLine
- CTATNumericStepper
- CTATPieChart
- CTATRadioButton
- CTATSkillWindow
- CTATSubmitButton
- CTATTable
- CTATTextArea
- CTATTextField
- CTATTextInput
- CTATVideo