FieldViewModel
FieldViewModel =
object
Defined in: packages/schema/src/model.ts:388
A view’s hints for one field (.fields((r) => ...)); see Names and columns.
Properties
Section titled “Properties”badgeShape?
Section titled “badgeShape?”
optionalbadgeShape?:BadgeShape
Defined in: packages/schema/src/model.ts:435
arrow draws the field’s badges as arrows pointing right, as on a rating scale such as the EU energy label.
confirm?
Section titled “confirm?”
optionalconfirm?:string
Defined in: packages/schema/src/model.ts:400
The question a form or a list cell asks before the field’s value first changes; cancelling keeps the value.
currency?
Section titled “currency?”
optionalcurrency?:string
Defined in: packages/schema/src/model.ts:415
The ISO 4217 code of the currency a decimal is an amount of, such as EUR: lists show it as money in that currency.
decimals?
Section titled “decimals?”
optionaldecimals?:number
Defined in: packages/schema/src/model.ts:419
How many decimals a number shows.
format?
Section titled “format?”
optionalformat?:FieldFormat
Defined in: packages/schema/src/model.ts:402
How the value is shown.
optionalhelp?:string
Defined in: packages/schema/src/model.ts:392
A line under the field on the record page and in forms.
helpWhen?
Section titled “helpWhen?”
optionalhelpWhen?:HelpWhen
Defined in: packages/schema/src/model.ts:394
When help shows: always, or only while the record is edited; the view’s helpWhen when omitted.
optionalicon?:string
Defined in: packages/schema/src/model.ts:424
An icon before the value on a card’s meta row and above it in a section of key facts, by the names actions take
(ruler); an unknown name shows none.
label?
Section titled “label?”
optionallabel?:string
Defined in: packages/schema/src/model.ts:390
What the field is called, instead of its name in words.
linkText?
Section titled “linkText?”
optionallinkText?:string
Defined in: packages/schema/src/model.ts:407
The text a url field’s link shows instead of the address: fixed, such as Error report, or with {{field}}
placeholders filled from the record, such as {{title}}; the address shows when it comes out empty.
markdown?
Section titled “markdown?”
optionalmarkdown?:boolean
Defined in: packages/schema/src/model.ts:411
Markdown: forms edit its source with a preview, and it shows rendered, raw HTML as text.
multiline?
Section titled “multiline?”
optionalmultiline?:boolean
Defined in: packages/schema/src/model.ts:409
A text that runs over several lines: forms edit it in a box that grows with it, and its line breaks show.
notOnCreate?
Section titled “notOnCreate?”
optionalnotOnCreate?:true
Defined in: packages/schema/src/model.ts:398
Left off the create form, so a create leaves it empty or to its default; the server refuses it on a field a create needs.
prefix?
Section titled “prefix?”
optionalprefix?:string
Defined in: packages/schema/src/model.ts:413
Text before a number wherever it is shown, such as €.
suffix?
Section titled “suffix?”
optionalsuffix?:string
Defined in: packages/schema/src/model.ts:417
Text after a number wherever it is shown, such as a unit: m² shows 120 m².
valueColors?
Section titled “valueColors?”
optionalvalueColors?:Record<string,BadgeTone|string&object>
Defined in: packages/schema/src/model.ts:431
A badge tone or a hex colour per enum value, such as { paid: 'green', a: '#00a651' }; a hex colour fills the badge.
A value without one is neutral.
valueLabels?
Section titled “valueLabels?”
optionalvalueLabels?:Record<string,string>
Defined in: packages/schema/src/model.ts:426
What an enum value reads as wherever it is shown; a value without one reads as itself in words (enumLabel).
waitingValues?
Section titled “waitingValues?”
optionalwaitingValues?:string[]
Defined in: packages/schema/src/model.ts:433
Enum values that mark a wait rather than work, such as queued: a Timeline draws their segments striped.
optionalwhen?:ShowWhen
Defined in: packages/schema/src/model.ts:396
When the field shows on the record page: always, the default, only on its form or only on its read view.
widget?
Section titled “widget?”
optionalwidget?:FieldWidgetModel
Defined in: packages/schema/src/model.ts:441
The field type a plugin registers (definePlugin({ fields })), or a built-in one such as members, that shows and
edits this field, with its props; without it, or for a storage type it does not show, the field shows as it would
without it.