
Input Object
The Input Object collects free-form responses from participants during an experiment. It supports five input types: number, text, date, time, and color. The response is stored in a linked variable and recorded automatically at the end of each trial. You can configure validation rules, display placeholder text to guide participants before they begin typing, and control the element via events.
Table of Contents
Adding the Input Object
In the task editor toolbar, open the Question Inputs group and select Input to add an Input Object to the current frame.
When the element is added, Labvanced prompts you to name the variable that will store the participant's response. Give it a descriptive name that reflects the data being collected (for example, response_text or age).
Input Types
Select the input type in the Object Properties panel. The linked variable's data type is set automatically to match.
| Input Type | Variable Data Type | Notes |
|---|---|---|
number | Numeric | Accepts integers and decimals. Min/max value validation available. |
text | String | Accepts any text. Character length validation available. |
date | Datetime | Displays a date picker. Date format configurable. |
time | Time | Displays a time picker. |
color | String | Displays a color picker. Stores the selected color value as a string. |
Properties
| Property | Default | Description |
|---|---|---|
Show Question Header | On | Shows the question text label above the input field. |
Show Placeholder | Off | When enabled, shows placeholder text inside the field before the participant begins typing. Available for number and text types only. |
Placeholder | (empty) | The placeholder text. Only visible in the panel when Show Placeholder is on. |
Required | Off | When enabled, the participant cannot submit the frame or questionnaire page until this field contains a valid value. |
Input type | number | The type of input field shown to the participant. Options: number, text, date, time, color. |
Focused | false | When set to true, moves keyboard focus to this field. Configurable per trial via the event system. |
Min-Value | (none) | For number type only. The lowest accepted value. |
Max-Value | (none) | For number type only. The highest accepted value. |
Min-Nr-Chars | (none) | For text type only. The minimum number of characters required. |
Max-Nr-Chars | (none) | For text type only. The maximum number of characters allowed. |
Date Format | browser-locale | For date type only. Controls how the date is displayed and entered. Options: browser-locale, yyyy-mm-dd, dd.mm.yyyy, mm/dd/yyyy. Only visible in the panel when input type is set to date. |
Placeholder Text
Placeholder text appears inside the input field when it is empty, before the participant starts typing. It disappears as soon as the participant begins entering a value.
To enable it:
- In the Object Properties panel, enable
Enable Placeholder. - Enter the desired text in the
Placeholder Textfield.
Use placeholder text to give participants a format hint (for example, Enter a number between 1 and 100) or a short instruction, without taking up space above the field with a full label.
Note: Placeholder text is not recorded as a response. It is display-only and does not affect the variable value.
Validation
The Input Object includes built-in validation options to ensure participants provide usable data before proceeding.
Required field: Enable Is Required to prevent frame or page submission until the field contains a valid, non-empty value. If a participant attempts to proceed without filling in a required field, the field is highlighted.
Numeric range: For number inputs, set Min Value and Max Value to clamp accepted entries. If a participant enters a value outside the range and then leaves the field, the value is automatically corrected to the nearest boundary.
Character length: For text inputs, set Min Nr Chars and Max Nr Chars to enforce length constraints. These are checked when Is Required is enabled.
Variable Integration
Each Input Object is linked to one global variable, created when you add the element. The variable stores the participant's current response value and is recorded at trial end.
The variable data type is set automatically based on the input type selected:
number→ Numeric variabletext→ String variabledate→ Datetime variabletime→ Time variablecolor→ String variable
To relink the element to a different variable, use the variable selector in the Object Properties panel.
Events Integration
The Input Object works with events in two ways: as a trigger target and as an action target.
Triggering events from the Input Object
The Enter On Input trigger fires when the participant presses Enter or Return while the input field is focused. Add your Input Object under Targets: in the trigger config.
Example: submit the frame when the participant presses Enter
Trigger:
Enter On Input→Targets: add your Input Object Action:Jump to Next Frame
Controlling the Input Object via actions
Two properties are modifiable at runtime via the Set Object Property action:
| Modifiable Property | Description |
|---|---|
Focused | When set to true, moves focus to the input field programmatically. |
required | Can be toggled at runtime to conditionally require the field based on earlier participant responses. |
Example: focus the input field when the frame starts
Trigger:
On Frame StartAction:Set Object Property→Set Target: your Input Object → property:Focused→ value:true
Example: make the field required based on a prior response
Trigger:
Variable Value Changed→ your condition variable Action:Set Object Property→Set Target: your Input Object → property:required→ value:true
You can also read the current response value from the linked variable in any event action, for example to branch experiment flow based on what the participant has typed.
Further Reading
Working with Variables
How to create, configure, and record variables. Covers the data types, recording options, and validation settings that apply to Input Object responses.
Variable Types
An overview of all variable types in Labvanced. Helps you understand why each input type links to a different variable data type.
Event System
How triggers and actions are structured. Covers setting object properties at runtime, including the Focused and Required controls for the Input Object.