Sequential Actions
These previews use Radiant because the docs app is Ecopages + Radiant UI.
Actions are registered capabilities that run in response to lifecycle
triggers. The form configuration determines the order in which action entries
are evaluated. Single-step recipes such as card render a submit control in
the actions slot; that control starts the submit lifecycle that runs the
plugins below.
Interactive demo
Configuration pattern
const formConfig: FormConfig = {
id: 'action-demo',
title: 'Action pipeline',
description: 'Submit once to run the configured plugins in order.',
steps: [
{
id: 'details',
title: 'Action pipeline',
elements: [
{
$type: 'input',
id: 'email',
name: 'email',
label: 'Email',
inputType: 'email',
rules: [
{
type: 'required',
message: 'Email is required'
}
]
}
]
}
],
view: {
$type: 'card',
shell: {
appearance: {
size: 'default',
surface: 'elevated'
}
},
header: {
align: 'center',
size: 'md'
}
},
actions: [
{
id: 'submit',
$type: 'submit',
endpoint: '/api/submit-demo',
method: 'POST',
enabled: true
},
{
id: 'notify',
$type: 'show_notification',
enabled: true,
message: 'Submitted successfully',
variant: 'success',
triggers: [
'form_submit_success'
]
},
{
id: 'reset',
$type: 'reset',
enabled: true,
triggers: [
'form_submit_success'
],
resetToDefaults: true
}
]
};Register the corresponding action registrations with
createFormEngine({ actions: [...] }). Docs previews route show_notification
through notificationPlugin({ onNotification }) and the site-wide
<RuiToaster position="bottom-end" />. Use form_submit_start,
form_submit_success, form_submit_error, and form_submit_complete for the
submit lifecycle; step navigation uses the step_* triggers.
The same configuration renders in React: React Forms.
See Actions for the built-in registrations and How Actions Work for execution semantics.