Skip to main content
Form renders a self-contained form whose fields map directly to columns of a schema table. This page explains the props, how submit binds to the table, and how on_submit fires a capability after the write. On submit, the runtime writes a new row to the table and, optionally, fires a capability — typically sendEmail for lead notifications or collectPayment for paid sign-ups. You list the fields you want; the Builder infers each input type from the column schema.

Example

form.json
{
  "block": "Form",
  "props": {
    "schema_table": "leads",
    "fields": ["name", "email", "company"],
    "submit_label": "Send",
    "on_submit": {
      "capability": "sendEmail",
      "args": { "template": "lead-thankyou", "to": "{{form.email}}" }
    }
  }
}

Props

How it binds to data

On submit, the runtime inserts a row into the table named in schema_table containing the values the user entered. Validation runs against the column types declared on the schema — required, type, length — before the write. Once the row is written, the runtime fires on_submit if it is set.

The on_submit capability binding

on_submit takes two keys: For example, to send a thank-you email to the address the user typed into the email field:
on-submit.json
{
  "capability": "sendEmail",
  "args": {
    "template": "lead-thankyou",
    "to": "{{form.email}}"
  }
}
The {{form.<field>}} tokens resolve at runtime after the row write, so they always reflect what the user actually submitted.

Patterns

Common props

In addition to the Form-specific props, every block accepts id, class_overrides, visible_if, and analytics_event. See common props on the PageBlocks overview.

Where to go next