Contact Form

1 Object type

Follow the steps below to install this Block. Make sure you have reviewed the getting started steps.
This will create the form-submissions Object type in your Bucket.
This will add the ContactForm.tsx file and components to your blocks folder located in cosmic/blocks/contact-form.
Import the block into your app.
Add the block component.
We will use the Resend email service to send emails. Run the following command to install the Resend JavaScript client. Learn more about sending emails with Resend on the Resend website.
Add the following keys to the `.env.local` file. Change the values to your Resend key and email that you would like to receive the form submissions. Find your Resend API key in the Resend dashboard.
Create a new file at app/api/submissions/route.ts with the following:
Create a new file at app/contact/page.tsx and add the following code. Then go to http://localhost:3000/contact to see the form.
footer logo