Forms for EmDash the way editors expect them: insert a Form block from the editor's slash menu, choose the fields, publish. Submissions are stored in the CMS, listed under Admin → Form Submissions, and optionally emailed to you.
compass.formPortable Text block — headline, description, configurable fields (text / email / phone / multi-line), button label, success message. Leave the fields empty for a sensible Name / Email / Message default.- Stored submissions with an admin list page (newest 50, per-form counts).
- Email notification per submission — set the address under Plugins → Compass Forms → Settings (requires an email provider configured in EmDash).
- Spam basics — honeypot field and a minimum-fill-time check, validated server-side.
- Analytics contract — the form emits
cfh:form_view,cfh:submit,cfh:success, andcfh:errorDOM events and mirrors them todataLayer(cfh_form_view…), with no field values ever included. Trigger GA4'sgenerate_leadoncfh_success. - Hosted mode — give the block a Compass client key and it renders the forms.compass.st embed instead: Cloudflare Turnstile, origin gating, routing and deliverability handled by the hosted service. Same markup contract, so your styles don't change.
npm install @ecropolis/emdash-plugin-compass-forms// astro.config.mjsimportcompassFormsfrom"@ecropolis/emdash-plugin-compass-forms";exportdefaultdefineConfig({integrations: [emdash({// ...plugins: [compassForms()],}),],});This is a native (trusted) plugin — it ships an Astro component for site-side rendering, which sandboxed marketplace plugins cannot do. Its block components merge into <PortableText> automatically; no theme changes required.
The form emits the Compass cfh- class contract (.cfh-form, .cfh-field, .cfh-label, .cfh-input, .cfh-textarea, .cfh-error, .cfh-status, .cfh-status-error, .cfh-submit, .cfh-success, .cfh-hp). Two rules are load-bearing:
.cfh-error:empty { display: none; }
.cfh-status:empty { display: none; }Ecropolis themes (e.g. Mainstreet) ship token-mapped styles for the full contract.
- Required-field enforcement is client-side; the server sanitizes and caps everything (field count, lengths, email shape) but does not know each block's field spec. Treat stored submissions as untrusted input.
- The notification email is best-effort: a failed send never loses the stored submission.
- Deleting the plugin's data on uninstall follows EmDash's
deleteDataflag.
MIT © Ecropolis