DropForm with Gatsby

Build a Gatsby contact form and submit to DropForm using fetch + FormData. Includes files, loading state, and safe JSON parsing.

Gatsby sites can submit directly to DropForm via: POST https://api.dropform.app/s/{uid}.

What you need

  • Your DropForm UID endpoint
  • A Gatsby site

Gatsby React form (FormData)

Common gotchas

  • Don’t set Content-Type for FormData
  • Handle non-JSON responses safely (see safeJson)

Next steps