Skip to main content

FormStep

Stentor API Reference


Stentor API Reference / stentor-models/src / FormStep

Interface: FormStep

Defined in: packages/stentor-models/src/Form/FormStep.ts:94

A step is partial form. Fields plus next/prev/submit buttons as needed. We are going through these "mini screens".

Extended by​

Properties​

name​

name: string

Defined in: packages/stentor-models/src/Form/FormStep.ts:95


title?​

optional title?: string

Defined in: packages/stentor-models/src/Form/FormStep.ts:96


subtitle?​

optional subtitle?: string

Defined in: packages/stentor-models/src/Form/FormStep.ts:102

Optional supporting line rendered beneath title.

Consumers decide placement; the form widget renders it in the step's intro block.


fields​

fields: FormField[]

Defined in: packages/stentor-models/src/Form/FormStep.ts:106

The fields that are part of the form.


condition?​

optional condition?: string

Defined in: packages/stentor-models/src/Form/FormStep.ts:108


nextAction?​

optional nextAction?: "next" | "submit" | "omit"

Defined in: packages/stentor-models/src/Form/FormStep.ts:116

The action to take when the user clicks the next button.

"next": move to the next step "submit": force "Next" instead of "Submit" (server generated next step). "omit": don't show the next button (for instance final "Thank you screen")


previousAction?​

optional previousAction?: "submit" | "omit" | "previous"

Defined in: packages/stentor-models/src/Form/FormStep.ts:124

The action to take when the user clicks the previous button.

"previous": move to the previous step "submit": force "Previous" instead of "Submit" (server generated previous step). "omit": don't show the previous button (for instance first step)


nextLabel?​

optional nextLabel?: string

Defined in: packages/stentor-models/src/Form/FormStep.ts:128

The label to use for the next button, defaults to "Next".


previousLabel?​

optional previousLabel?: string

Defined in: packages/stentor-models/src/Form/FormStep.ts:132

The label to use for the previous button, defaults to "Previous".


final?​

optional final?: boolean

Defined in: packages/stentor-models/src/Form/FormStep.ts:136


crmSubmit?​

optional crmSubmit?: boolean

Defined in: packages/stentor-models/src/Form/FormStep.ts:139


warnBeforeUnload?​

optional warnBeforeUnload?: boolean

Defined in: packages/stentor-models/src/Form/FormStep.ts:151

Beta

Warn the user before unloading the page if there are unsaved changes.

This is especially helpful when either crmSubmit is true or final is true, to prevent users from accidentally losing their data.

This will trigger a browser dialog when the user attempts to close the tab or navigate away which does not work on all browsers.

This is a beta feature and may change in future releases.


warnBeforeUnloadMessage?​

optional warnBeforeUnloadMessage?: string

Defined in: packages/stentor-models/src/Form/FormStep.ts:160

Beta

Custom message to display in the unload warning dialog. This is used when the use attempts to hit the 'X' button on the form when they have unsaved changes.

This is a beta feature and may change in future releases.

Note: Most browsers do not display custom messages anymore, but having this property allows for future compatibility and clarity.


fullBleed?​

optional fullBleed?: boolean

Defined in: packages/stentor-models/src/Form/FormStep.ts:166

Render this step edge-to-edge, suppressing the container's horizontal gutters. Third-party embeds frequently require the full container width.