App Studio
Submit Form Action
The Submit Form action programmatically submits a Form Widget — typically triggered by an external Button widget outside the form, or by a parent action chain.
When to Use Submit Form Action
Atlas Forms render their own Submit button inside the form. The Submit Form action is used when you need to:
- Trigger form submission from a Button widget outside the Form Widget
- Submit a form as part of a larger action chain (e.g., validate → submit → navigate → notify)
- Implement a "Save and Continue" pattern where submission and navigation are controlled by the app, not the form
Submit Form Action Config
// SubmitFormActionConfig
{
"type": "submit-form",
"formWidgetId": "lead-edit-form", // ID of the Form Widget to submit
"onSuccess": { // actions to run after successful submit
"type": "navigate",
"target": "/leads",
"replace": true
},
"onError": { // actions to run after failed submit
"type": "set-variable",
"variable": "submitError",
"value": "Form submission failed. Please check the errors."
}
}
Typical Pattern: External Submit Button
// Layout: Form Widget + Submit Button in a flex Pane
// Form Widget config:
{
"widgetId": "lead-edit-form",
"type": "Form",
"config": {
"formId": "lead-edit-atlas-form",
"hideSubmitButton": true // hide Atlas Form's own submit button
}
}
// Button Widget config:
{
"widgetId": "save-btn",
"type": "Button",
"config": { "label": "Save Changes", "variant": "primary" },
"actions": {
"onClick": {
"type": "submit-form",
"formWidgetId": "lead-edit-form",
"onSuccess": {
"type": "chain",
"actions": [
{ "type": "set-variable", "variable": "savedMsg", "value": "Lead saved!" },
{ "type": "navigate", "target": "/leads", "replace": true }
]
}
}
}
}
Form Widget ID Reference
The formWidgetId must match the widgetId of the Form Widget in the same app — not the Atlas Form's formId. These are different identifiers. The widget ID is what you set in the App Tree when you rename the widget.