Contact form for Gatsby
A contact form for Gatsby
@boosterpack/react-form. It handles the silent spam checks and the submit. No extra script tag.How to add it
Create the form, paste it into Gatsby, click activate once.
Sign in to your dashboard and copy the form ID.
Run npm i @boosterpack/react-form.
Use <BoosterpackForm> or useBoosterpackForm in any page or component.
Deploy, open the live page, click Activate form, and confirm from your inbox.
Copy this
Copy your form ID from the dashboard, then drop this in.
<form method="POST" action="https://boosterpackforms.com/api/forms/<FORM_ID>/submit">
<input name="name" placeholder="Name" required />
<input name="email" type="email" placeholder="Email" required />
<textarea name="message" placeholder="Message" required></textarea>
<button type="submit">Send</button>
</form>Gatsby is React, so you can skip the script and use the official package.
npm i @boosterpack/react-form'use client'
import { BoosterpackForm } from '@boosterpack/react-form'
export function ContactForm() {
return (
<BoosterpackForm formId='<FORM_ID>'>
{({ status, error }) => (
<>
<input name='name' placeholder='Name' required />
<input name='email' type='email' placeholder='Email' required />
<textarea name='message' placeholder='Message' required />
<button type='submit' disabled={status === 'sending'}>
{status === 'sending' ? 'Sending…' : 'Send'}
</button>
{status === 'success' && <p>Sent!</p>}
{status === 'error' && error && <p>{error}</p>}
</>
)}
</BoosterpackForm>
)
}Static build: the package only runs in the browser. The form renders during the build; spam checks happen when someone submits.
One-time activation
Open the live page. Click Activate form. We email you so only you can turn the form on for that domain. Each inbox you add also confirms once. After that, it stays on.
What you get
Common questions
Do visitors have to solve a CAPTCHA?
Is there a free plan?
Can I send submissions to Slack or Discord too?
Does Boosterpack Forms store the messages?
Free plan. No credit card.