FormTextInput
Stentor API Reference / stentor-models/src / FormTextInput
Interface: FormTextInput
Defined in: packages/stentor-models/src/Form/FormField.ts:159
Text input field with optional validation and formatting.
Supports both single-line and multi-line text input with various format validators (phone, email, address, zip code).
Extendsβ
Extended byβ
Propertiesβ
nameβ
name:
string
Defined in: packages/stentor-models/src/Form/FormField.ts:79
Name of the form input, this is not human readable and is used to identify the field.
For example: "SERVICE" or "FULL_NAME"
Inherited fromβ
title?β
optionaltitle?:string
Defined in: packages/stentor-models/src/Form/FormField.ts:83
Optional title used to display on the input
Inherited fromβ
typeβ
type:
"CARD"|"TEXT"|"DROPDOWN"|"CHECK"|"CHIPS"|"DATE"|"DATERANGE"
Defined in: packages/stentor-models/src/Form/FormField.ts:87
Type of the input
Inherited fromβ
shape?β
optionalshape?:"ROUND"|"SQUARE"
Defined in: packages/stentor-models/src/Form/FormField.ts:91
Optional, used to shape the input. Not applicable to all inputs.
Inherited fromβ
condition?β
optionalcondition?:string
Defined in: packages/stentor-models/src/Form/FormField.ts:98
A condition that must be met for the field to be shown.
For example: "issue === 'service_repair'" - issue is a field name in this example
Inherited fromβ
mandatory?β
optionalmandatory?:boolean
Defined in: packages/stentor-models/src/Form/FormField.ts:102
Is the field required.
Inherited fromβ
mandatoryError?β
optionalmandatoryError?:string
Defined in: packages/stentor-models/src/Form/FormField.ts:106
Error message to show when the field is required but not filled out.
Inherited fromβ
mandatoryGroup?β
optionalmandatoryGroup?:string
Defined in: packages/stentor-models/src/Form/FormField.ts:110
Group fields together where one of the fields in the group is required.
Inherited fromβ
style?β
optionalstyle?:object
Defined in: packages/stentor-models/src/Form/FormField.ts:116
React.CSSProperties style object to apply to the field.
For example: {{ width: '300px', height: '150px' }}
Inherited fromβ
multiline?β
optionalmultiline?:boolean
Defined in: packages/stentor-models/src/Form/FormField.ts:163
When true, renders as a textarea instead of a single-line input
format?β
optionalformat?:"EMAIL"|"ADDRESS"|"PHONE"|"ZIP_CODE"
Defined in: packages/stentor-models/src/Form/FormField.ts:167
Format validation to apply to the input. Default is free text with no validation.
placeholder?β
optionalplaceholder?:string
Defined in: packages/stentor-models/src/Form/FormField.ts:171
Placeholder text shown when the input is empty
label?β
optionallabel?:string
Defined in: packages/stentor-models/src/Form/FormField.ts:175
Accessible label for the input field
rows?β
optionalrows?:number
Defined in: packages/stentor-models/src/Form/FormField.ts:179
Number of rows for textarea (only applicable when multiline is true)
rowsMax?β
optionalrowsMax?:number
Defined in: packages/stentor-models/src/Form/FormField.ts:183
Maximum number of rows for textarea (only applicable when multiline is true)
maxLength?β
optionalmaxLength?:number
Defined in: packages/stentor-models/src/Form/FormField.ts:187
Maximum character length allowed for the input