Short text fields
Use short_text_input when you want a respondent to enter one line of text, such as a name. Its answer is stored as a string under the field’s name.
Configuration
Short text fields also accept shared field properties.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
placeholder | string | No | None | Grey hint text inside the empty input. Accepts any text and supports {{field}} piping. |
defaultValue | string | No | None | Prefills the input. Accepts any text and may contain a {{hidden_name}} reference. |
Validation
A required field with no answer, or an answer containing only spaces, blocks the respondent from continuing. An answer longer than 255 characters shows a message under the field. A field hidden by visible_if or hide_if is not validated.
Submission value
The field’s name is its key in submission data. A short text answer is stored as a string.
Cross-field notes
You can use {{field}} piping in the placeholder. To prefill this field from a URL, declare a hidden field and set defaultValue to its {{hidden_name}} reference. A matching hidden-field URL value takes priority over defaultValue.
Example
{
"type": "short_text_input",
"name": "full_name",
"label": "What is your full name?",
"placeholder": "Jane Doe",
"defaultValue": "",
"required": true
}