Portal Community

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:

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.