Common flow when a lead comes in: open the entry, then hand-copy the fields into an email reply. Worth automating.
Add a "Copy as email reply" button to the entry detail view (packages/astro-forms/src/server/admin/entry-detail.astro) that formats the captured fields into a plain-text draft and puts it on the clipboard.
Something like:
Hi {name},
Thanks for reaching out.
> Your message:
> {message field, quoted}
---
Submitted {date} via {form id}
Implementation notes:
navigator.clipboard.writeText() in a small inline script; progressive enhancement, so the button can be hidden when clipboard API is unavailable.
- Field mapping should be dumb: name-ish field, email-ish field, message-ish field, then everything else as a key/value block. Don't over-engineer detection.
- Show a brief "copied" confirmation on the button itself.
No server changes needed.
Common flow when a lead comes in: open the entry, then hand-copy the fields into an email reply. Worth automating.
Add a "Copy as email reply" button to the entry detail view (
packages/astro-forms/src/server/admin/entry-detail.astro) that formats the captured fields into a plain-text draft and puts it on the clipboard.Something like:
Implementation notes:
navigator.clipboard.writeText()in a small inline script; progressive enhancement, so the button can be hidden when clipboard API is unavailable.No server changes needed.