Skip to content

Text Response

A text response allows participants to answer a question or leave a comment by typing in a text box.

Required Properties

type

  • Definition: The type of response
  • Possible values: For a text response, type must be specified as "text".
1
2
3
{
  "type": "text"
}

Optional Properties

delay

  • Definition: Delay the displaying of a response (relative to the latest onset of all stimuli on a given trial) by a certain number of seconds. This setting can be useful for forcing participants to read some text before making a response.
  • Possible values: Any numeric value (fractions are supported)
  • Default value: 0
1
2
3
4
{
  "type": "text",
  "delay": 1
}

duration_timer

  • Definition: Whether to show a duration timer that indicates the time elapsed since the reponse becomes visible.
  • Possible values: true,false
  • Default: false
1
2
3
4
{
  "type": "text",
  "duration_timer": true
}

duration_timer_onset

Dependencies

Requires duration_timer to be set to "true".

  • Definition: When to show the duration timer. When set to "start", the timer will appear as soon as the response is displayed and animate a stopwatch effect. When set to "end", the duration timer will only appear once the participant has made a reponse with no stopwatch effect.
  • Possible values: "start", "end"
  • Default: start
1
2
3
4
5
{
  "type": "text",
  "duration_timer": true,
  "duration_timer_onset": "start"
}

height

  • Definition: The height of the text box, in “px” (pixels).
  • Possible values: pixels (i.e. "50px")
  • Default value: "200px"
  • See also: width

1
2
3
4
{
  "type": "text",
  "height": "50px"
}
The height of the resulting text box will be 50 pixels.

instruction

  • Definition: A string of text providing instructions for participants about the current response. Use empty quotes ("") to remove the instruction text.
  • Possible values: A string of text
  • Default value: "Type your answer here:"

1
2
3
4
{
  "type": "text",
  "instruction": "Type the first number that comes to mind:"
}
In this example code, participants will see the instruction "Type the first number that comes to mind:" above the text box.

1
2
3
4
{
  "type": "text",
  "instruction": ""
}
In this example code, participants will see no instruction accompanying the text box.

max_characters

  • Definition: The maximum number of characters allowed in this response.
  • Possible values: A number

    Note

    What counts as a character may differ between languages.

  • Default value: -1, meaning no limit

1
2
3
4
{
  "type": "text",
  "max_char": 50
}

min_characters

  • Definition: The minimum number of characters allowed in this response.
  • Possible values: A number

    Note

    What counts as a character may differ between languages.

  • Default value: 0, meaning no minimum.

1
2
3
4
{
  "type": "text",
  "max_char": 50
}

min_seconds

  • Definition: The minimum number of seconds that a participant must wait before they can submit their response.
  • Possible values: A number in seconds
  • Default value: 0, meaning no restrictions.

Note

Participants will still be able to begin typing before the min_seconds duration. This feature simply prevents participants from submitting what they've written before the min_seconds duration. This feature may have varying effectiveness in encouraging a longer response from participant to participant.

1
2
3
4
{
  "type": "text",
  "min_seconds": 10
}

parent

  • Definition: If specified, this response will inherit all properties from another defined response (aka, the parent), unless the same property is explicitly defined in this response.
  • Possible values: The name of another defined response.

Given a response named "response1" defined as follows:

1
2
3
4
5
{
  "type": "text",
  "width": "100px",
  "height": "50px"
}

You can define a child response "response2" that inherits all of its parent's properties:

1
2
3
4
{
  "type": "text",
  "parent": "response1"
}

required

  • Definition: Whether participants must provide a response to this response.
  • Possible values: true, false
  • Default value: false
1
2
3
4
{
  "type": "text",
  "required": true
}

spellcheck

  • Definition: If set to false, the text response will not alert participants about potential misspelled words, which is useful if participants are supposed to type non-dictionary words.
  • Possible values: true, false
  • Default value: true

Note

Spellcheck functions are provided by the browser and may differ between browsers.

1
2
3
4
{
  "type": "text",
  "spellcheck": false
}

target

  • Definition: The expected response. If the participant enters the same response, it would be marked as "correct" in the participant data CSV.

    Note

    All leading and trailing whitespaces in the participant's response will be removed before being compared to the target.

  • Possible values: Any string of text

  • Default value: Not set
  • See also: target_match

1
2
3
4
{
  "type": "text",
  "target": "LEFT"
}
In this example code, if a participant enters the word "LEFT" in the text box, FindingFive will recognize their response as correct.

target_match

Dependencies

Requires target to be defined.

  • Definition: If set to true, participants must type in an answer that matches the target as defined above in order to continue the study (a good use case of this feature is to implement a passcode).
  • Possible values: true, false
  • Default value: false
  • See also: target

1
2
3
4
5
{
  "type": "text",
  "target": "LEFT",
  "target_match": true
}
In this example code, participants will not be able to move on unless they ender the word "LEFT" in the text box.

timeout

  • Definition: The number of seconds for which the participant can type their response. When the timeout duration passes, the text box will be immediately disabled and the response typed in by the participant will be automatically submitted.
  • Possible values: A number in seconds
  • Default: Not set, meaning the response will not time out
  • See also: min_seconds
1
2
3
4
{
  "type": "text",
  "timeout": 15
}

width

  • Definition: The width of the text box, in “px” (pixels).
  • Possible values: pixels (i.e. "100px")
  • Default value: "500px"
  • See also: height
1
2
3
4
{
  "type": "text",
  "width": "100px"
}

Recorded Data

  • value: the text typed in by the participant
  • rt: reaction time, defined as the number of milliseconds between when the text box starts accepting input and the moment when the participant submits their response