Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Blocks
  2. Form Wizard
  3. API and Development

Form wizard

API and Development

View SourceOpens in a new tabSubmit IssueOpens in a new tab
Import
Load @prepared911/ui/styles.css once at the document root.
FormWizard
NameRequiredDescription
titleyesThe flow's name in the header. Not the name of the record.
closeLabelyesAccessible name of the close control, which is Cancel.
steps or sectionsyes, one of the twoOrdered steps, or named groups of steps for the horizontal stepper.
currentyesId of the current step.
onCurrentChangeyesCalled with the step id and { reason: "back" | "select" }. No validation runs.
onStepSubmityesCalled with { stepId, nextId, isLast, event }. Validate here; return a promise to hold the wizard pending.
stepperLabelyesAccessible name of the stepper.
stateLabelsyesState text the stepper reads before each label.
backLabelyesLabel of Back, drawn from the second step on.
continueLabelyesLabel of Continue before the last step.
submitLabelyesLabel of the primary on the last step: the finishing verb.
childrenyesThe current step's fields.
stepErrorsnoError copy by step id. A step with an entry shows the error state.
pendingnoWhether a step is saving.
stepperLayoutnoFormWizardStepperLayout.Auto (default), Rail or Top.
selectionnoStepperSelection.Completed (default) or Available.
announcement, sectionSummarynoStepper announcement and section position copy.
submitPendingLabelnoAccessible name of the primary while pending.
onSaveAndExit with saveAndExitLabelnoHeader Save + exit, passed together. Called with { stepId }. Not drawn without them.
description, requiredHintnoCopy under the title and above the fields.
scrollRegionLabel, startScrollRegionLabelnoNames for the form and rail regions when they overflow.
trigger, open, defaultOpen, onOpenChangenoOpen state, as TakeoverDialog.
refnoThe dialog element.
A step is { id, label, description?, optional?, disabledReason? }. A section is { id, label, steps }.
Development
The block draws the stepper in TakeoverDialog's start slot, Save + exit in headerActions and Back and Continue in footer. The form is FormLayoutStandard with a hidden footer at Full width, in a Breakpoint.CenteredBlock column. Continue is linked to the form with the native form attribute. The block has no stylesheet of its own.
Previous
Form wizard / Usage
Next
Form wizard / Accessibility
On this page
Import
FormWizard
Development