Form Actions Overview
Actions are the buttons and triggers that appear in a form's action bar. Every form has an actions[] array in its schema. Each action has a type, label, variant, and optional configuration. Atlas Forms ships eight built-in action types covering all standard form workflows.
What Are Actions?
Actions transform a passive data-collection form into an interactive workflow participant. Without actions, a form is just fields. With actions, the form can submit data to a workflow, cancel and discard, navigate to a related form, insert preset data rows, and much more.
Actions render in the form's action bar — typically a row of buttons at the bottom of the form. The placement, order, and visibility of each action is fully configurable.
The Eight Built-In Action Types
submit
Triggers form validation and calls the onSubmit callback. The primary completion action for most forms.
cancel
Discards changes after an optional dirty-check confirmation dialog. Returns the user to the previous context.
reset
Resets all fields to their initialValues. Differs from cancel — the user stays on the form.
navigate
Routes the browser to a URL or workflow step without submitting. Used for multi-form flows.
link
Matrix dispatch — opens a child form by looking up a record key. Powers list-to-detail navigation.
addQuickItems
Inserts preset rows into a data-table control with one click. Accelerates repetitive row entry.
deleteSelected
Deletes all checked rows in a data-table control. Pairs with addQuickItems.
custom
Calls a registered custom action handler. Opens Atlas Forms to any business logic.
The actions[] Array
Actions live at the root of the form schema, parallel to controls[] and sections[]:
{
"version": "1.0.0",
"metadata": { ... },
"controls": [ ... ],
"sections": [ ... ],
"actions": [
{
"type": "submit",
"label": "Save Changes",
"variant": "primary",
"icon": "save"
},
{
"type": "cancel",
"label": "Discard",
"variant": "ghost"
}
]
}
Common Action Properties
| Property | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Action type identifier: submit, cancel, reset, navigate, link, addQuickItems, deleteSelected, custom |
label | string | Yes | Button text shown to the user |
variant | primary | secondary | ghost | danger | No | Visual style of the button |
icon | string | No | Icon name (Font Awesome free icon identifier) |
disabled | boolean | No | Statically disable the button. Use disabledRule for dynamic disabling. |
disabledRule | string | No | Expression evaluated against current form values. Button disabled when true. |
visibilityRule | string | No | Expression — action hidden when false. |
config | object | Varies | Action-type-specific configuration. |
order | number | No | Sort order in the action bar. Lower = left-most. |
Action Variants
| Variant | Visual | When to Use |
|---|---|---|
primary | Solid accent colour button | The main, positive action (Submit, Save) |
secondary | Outlined button | Secondary actions (Save Draft, Export) |
ghost | Text-only, no border | Low-emphasis actions (Cancel, Back) |
danger | Red/destructive styling | Delete, Archive — actions with irreversible effects |