FS FormScript

Contract

The payload is the contract

The PDF or the email omits a field the API requires — or includes one the person was never asked.

what this buys you

  • Omitted means not asked
  • null means asked and blank
  • Pages add no data level
  • The output block is the allowlist
Language specification 1.0 · level 3 of 5

Promise. The output block is the allowlist. An inapplicable field is omitted. An applicable empty field is JSON null. Pages and sections add no data level, so moving a field between steps does not change the JSON.

Absent means absent

A field the person was never asked about does not appear. No nulls to filter out downstream.

Blank means blank

An applicable field the person left empty is null — which is a real answer, not a missing one.

Steps do not add levels

Pages and sections are presentation. Moving a field from step one to step three does not change the JSON.

forms
form intake version = "1.0" {
  field postcode {
    type = string
    when = country == "GB"
  }
  output {
    postcode: string
  }
}

A confirmation, a PDF, or an email should be a projection of $form.output. FormScript does not generate the PDF; it makes the payload trustworthy enough to project.

Boundary. Over-posting of fields outside the form is stopped. Authorization is still the server’s job.