How to add a contact form to an Astro site without a backend
Static sites are fast, cheap, and easy to deploy. But they don't have a server to receive form submissions.
If you're building a portfolio, landing page, documentation site, or small business website with Astro, you eventually need a way to handle contact forms without setting up and maintaining your own backend.
In this tutorial, we'll build a working contact form using Web3Forms, then look at some alternatives and their trade-offs.
1. The easiest solution: Web3Forms
Web3Forms lets you submit form data to an endpoint without creating your own server.
Its free plan currently offers a limited monthly submission allowance, making it useful for small projects and personal websites.
Get your access key
Visit Web3Forms and generate an access key.
You don't need to create a traditional backend. The key is used to identify your form submissions.
2.…