Guide · 2 minutes
Contact form for Astro
No adapter, no API endpoint, no email service. A plain form post, and every answer lands in Slack, Discord or email.
Create a form and copy its URL
Sign in, create a form, and copy the submit URL from its setup page. That URL is the whole backend.
Post the form to it
Astro ships plain HTML, so a regular form post is all you need. It works on fully static builds.
---
const action = 'https://betterform.dev/f/k7m2x9'
---
<form action={action} method="post">
<input name="email" type="email" required />
<textarea name="message" />
<button>Send</button>
</form>Pick where answers go
Add a Slack channel, a Discord channel or an email address. Every submission goes there, and spam is held back without captchas.
Rather not write it? Ask your agent.
Add a contact form to my Astro site with betterform.