FormInput
Stentor API Reference / stentor-models/src / FormInput
Interface: FormInput
Defined in: packages/stentor-models/src/Form/FormField.ts:73
Form field base class
Extended byβ
FormTextInputFormDropdownInputFormChipsInputFormSelectInputFormCardInputFormDateInputFormDateRangeInput
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"
title?β
optionaltitle?:string
Defined in: packages/stentor-models/src/Form/FormField.ts:83
Optional title used to display on the input
typeβ
type:
"CARD"|"TEXT"|"DROPDOWN"|"CHECK"|"CHIPS"|"DATE"|"DATERANGE"
Defined in: packages/stentor-models/src/Form/FormField.ts:87
Type of the input
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.
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
mandatory?β
optionalmandatory?:boolean
Defined in: packages/stentor-models/src/Form/FormField.ts:102
Is the field required.
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.
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.
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' }}