Trip Interface Description 1.2.2 Help

Text Box

A question of type text_box allows the user to enter text. This is a single-line text input field.

{ "id": 0, "required": true, "key": "text_box", "type": "text_box", "label": "Text (short)", "description": null, "answers": [ { "nextQuestionId": 1, "options": { "maxLength": 100 } } ] }

Answer Options

This chapter describes the option possibilities for an answer.

Name

Type

Description

Required

Default

minLength

int

Minimum allowed length for the answer.

false

0

maxLength

int

Maximum allowed length for the answer.

false

0 (unlimited)

regex

string

Regex pattern for answer validation.

false

None

defaultValue

string

Default value to pre-fill the input.

false

None

password

bool

If true, input is hidden as password.

false

false

uppercase

bool

If true, input is forced to uppercase.

false

false

allowEmojis

bool

If false, emojis are not allowed.

false

true

Examples

Example with a configured maxValue

Text box question with a max length of 100
{ "id": 0, "required": true, "key": "text_box", "type": "text_box", "label": "Text (short)", "description": null, "answers": [ { "nextQuestionId": 1, "options": { "maxLength": 100 } } ] }

Example with password input

Text box question as password
{ "id": 0, "type": "text_box", "required": true, "key": "text_box_password", "label": "Text (password)", "description": null, "answers": [ { "id": 0, "nextQuestionId": 1, "options": { "password": true } } ] }
Last modified: 04 June 2025