Configuration, publishing, and schemas
Form configuration is edited as a draft in the FormRoost portal, saved safely with revision control, and explicitly published when ready for live traffic.
Validation modes: Flexible vs. Strict
- Flexible mode: Accepts any valid key-value JSON object or form-encoded payload up to your plan's size and field-count limits. Useful when prototyping or when fields evolve frequently.
- Strict mode: Validates incoming submissions against a JSON Schema (Draft 2020-12) compiled with FormRoost's validator.
- Set
additionalProperties: falseto block unexpected fields injected into client requests. - Enforce
required, stringminLength/maxLength,formatchecks (email,uri, etc.),enumvalues, numbers, and nested objects or arrays. - Invalid payloads return HTTP
422(submission_schema_invalid) with up to 20 structured JSON Pointer error entries inerrors(without echoing invalid visitor input back on the wire).
- Set
Note that reserved control fields such as _fr_idempotency_key, _fr_started_at, cf-turnstile-response, and your configured honeypot field are handled by FormRoost's ingestion checks before validating your form fields.
Allowed origins (CORS and browser protection)
- Production: Browser submissions (requests sending an
Originheader) must come from an HTTPS origin listed under Allowed origins. Plainhttp://origins are rejected in production (403origin_not_allowed). - Sandbox: Allows HTTPS origins as well as explicit local
http://localhost:<port>orhttp://127.0.0.1:<port>origins so local development matches production checks cleanly. - Wildcards: Subdomain wildcard patterns (for example
https://*.example.com) are supported for preview deployments such as Netlify, Vercel, or Cloudflare Pages branch URLs. Only host-prefix wildcards for subdomains are accepted; include the scheme (https://) with no path, query string, or trailing slash. - Server-to-server calls: Requests with no
Originheader authenticate with a matching project API key (Authorization: Bearer fr_sandbox_...orfr_production_...) instead of browser origin checks.
Success and error redirects
For traditional HTML <form method="post"> submissions (non-fetch requests accepting HTML):
- If a Success redirect URL is configured, accepted submissions respond with HTTP
303 See Otherpointing to that URL (instead of displaying FormRoost's confirmation page). - If an Error redirect URL is configured, validation or rejection errors redirect via HTTP
303 See Otherwith status context so visitors return smoothly to your site.
Drafts, diffs, publishing, and rollback
Every edit in the portal autosaves to your form's draft using optimistic revision checks (revision), preventing accidental overwrites if two tabs are open. Before going live:
- Inspect the diff between your draft and the currently published configuration.
- Click Publish to create a numbered immutable configuration snapshot (
v1,v2, ...). - If a live schema or origin change causes an issue, select any previous snapshot in Version history to roll production traffic back immediately without touching your codebase.