ADR-0069 — The form is drawn from the collect spec
- Status: Accepted
- Date: 2026-08-28
- Deciders: Repository owner, track 003 phase 04
- Follows: ADR-0067 (a block type ships its own render descriptor), ADR-0068 (what a block collects is registry data)
Context
ADR-0068 made which types collect, what keys they accept and where the
answer lands into registry data, read by the submission handler. It left the
endpoint with no caller. Cardsite's three collector blocks — email_collector,
phone_collector, contact_collector — drew a headline over a line of prose
("Enter your email") and no controls at all. A visitor could read the
invitation and had nothing to type into; the thank_you_url every collector's
settings form has always offered led nowhere, because nothing ever completed.
So the free-plan blocks whose whole purpose is a mailing list had never
collected one address.
The obvious repair is a form per collector type. That is the enumeration ADR-0068 just deleted, moved to the frontend: a table of which types get which inputs, which a type registered server-side would not be in.
Decision
A collector's form is drawn from the block's served collect spec. The
public payload carries collect beside render_spec for any type whose
registry entry declares one; the capture-prompt render kind draws one control
per declared field, in the declared order, and posts exactly those keys to the
submission endpoint. Nothing in apps/web names a collector type.
Three consequences follow from that sentence:
- The registry says what; the kind says how. The spec declares payload
keys; the control a key gets is presentation, derived from the key
(
email→type="email",phone→tel) with a plain text field as the fallback. An unrecognised key is asked for, never declined — a declining form would mean a newly registered collector needs a deploy to be answerable, which is the property this phase exists to protect. Labels come fromhumanizeLabel, the same helper the settings form uses. - A page slug is what makes a form live. The public page passes the biolink's slug and the form submits; the editor canvas passes none, draws the identical form, and posts nothing. An owner typing into their own preview is not a lead, and preview stays what a visitor sees.
- The thank-you URL finally means something. A submission that lands sends
the visitor to
settings.thank_you_urlwhen the block has one, and shows an acknowledgement in place of the form when it does not.
The submit label is a descriptor prop with a default, so a served render spec
can name its own call to action — the same "a type registered server-side owns
its own account of itself" rule as ADR-0067.
Consequences
- The submission endpoint has a caller.
email_collectorandphone_collectorcollect what they are named for;contact_collectorcollects name, email and phone, because that is what its registry entry declares — not because anything here knows what a contact is. - A collector type registered in
block_types.gowith aCollectspec and acapture-promptrender spec draws its form, submits, and stores, with noapps/webchange. That is phase 03's demonstration extended to the write path. contact-buttonsis still not the kit's contact buttons. The kind draws a prompt over a form; turning the type into the kit's real surface stays a product call, and the descriptor notes say so rather than the code implying otherwise.- The second sink (webhook, email, external list) is unaffected: the form posts to one endpoint, and where the answer goes is the spec's business server-side (ADR-0068). It stays a slice, not a redesign.
formatSubmissionMessagestill switches on block type to phrase the notification. It is unchanged here and remains the open row ADR-0068 left.
Source: docs/decisions/0069-the-form-is-drawn-from-the-collect-spec.md