Skip to main content
Astro can submit directly from HTML, so a basic form does not need a client-side framework or API route.

Create the page

Add a page or component such as src/pages/contact.astro. Replace YOUR_FORM_PUBLIC_KEY in the endpoint URL and update the redirect URL.
The form works as normal HTML after Astro builds the page. The form-specific endpoint URL is intentionally public and may appear in the generated markup; it can accept responses but cannot read them.

Show the result without leaving the page

If you prefer an inline success message, give the form an id and add a client-side <script> that submits it with fetch(). The request is the same as the JavaScript form example.

Test the production page

Submit a response from the deployed domain and confirm it appears in Submissions. If CAPTCHA is enabled, register the production hostname with the provider before testing.