Static Forms - Secure form backend and form endpoint for contact formsStatic Forms - Secure form backend and form endpoint for contact forms
  • Home
  • Features
  • Docs
  • Blog
  • Pricing
Register
  • Home
  • Features
  • Docs
  • Blog
  • Pricing
Documentation

Learn how to use Static Forms

  • Introduction
  • Quick Start
  • Basic Setup
  • How It Works
  • Form Basics
  • API Key
  • Redirects
  • Overview
  • Honeypot Field
  • reCAPTCHA
  • Cloudflare Turnstile
  • hCaptcha
  • ALTCHA
  • Overview
  • Application Forms
  • Form Submissions
  • Webhooks
  • Auto Responders
  • Custom Email Templates
  • AI Reply
  • CC Emails
  • Branding & Custom Domain
  • File Uploads
  • Domain Restriction
  • Custom Subjects
  • Reply-To Address
  • Overview
  • Slack
  • Discord
  • Make
  • n8n
  • Google Sheets
  • Notion
  • Airtable
  • Overview
  • React
  • Next.js
  • Vue.js
  • Angular
  • Svelte
  • Astro
  • Plain HTML
  • Netlify
  • Vercel
  • Cloudflare Pages
  • GitHub Pages
  • WordPress
  • Webflow
  • Wix
  • Complete Reference
  • Account Settings
  • Pricing Plans
  • Overage Billing
  • Common Issues
  • Debugging
  • CORS Issues
  • Email Delivery
  • FAQ
  • Get Support
  • Changelog
Support
Framework Guide

React Integration

Learn how to integrate Static Forms with your React applications

Static Forms works seamlessly with React applications. This guide covers different approaches to handle form submissions in React, from simple HTML forms to fully controlled components with validation.

Basic HTML Form (Simplest)

The simplest approach is to use a standard HTML form. React will handle the rendering, but the form submission is handled by the browser:

components/ContactForm.tsx

Environment Variables

Store your API key in environment variables. In Create React App use REACT_APP_ prefix, in Vite use VITE_, and in Next.js use NEXT_PUBLIC_ for client-side variables.

Fetch API with State Management

For better control over the submission process and user feedback, use the Fetch API with React state:

components/ContactForm.tsx

With JSON Payload

Send form data as JSON instead of FormData for better control:

TypeScript

With React Hook Form

Integrate with the popular React Hook Form library for advanced validation:

components/ContactForm.tsx

Installation

Install React Hook Form with: npm install react-hook-form

With File Uploads

Handle file uploads using FormData:

TypeScript

File Size Limit

Maximum file size is 5MB per file. File uploads require a Pro plan.

Best Practices

Store API Keys Securely

Always use environment variables for API keys. Never commit them to version control.

Provide User Feedback

Show loading states, success messages, and error messages to keep users informed.

Handle Errors Gracefully

Always wrap fetch calls in try-catch blocks and provide helpful error messages.

Add Client-Side Validation

Validate form inputs before submission to improve user experience and reduce errors.

Next Steps

Add Spam Protection

Integrate reCAPTCHA, Cloudflare Turnstile, or ALTCHA

Set Up Webhooks

Receive real-time notifications

File Uploads

Handle file attachments

Auto Responders

Send automatic confirmations

Previous
Overview
Next
Next.js

Documentation

  • Introduction
  • Quick Start
  • Basic Setup
  • How It Works
  • Form Basics
  • API Key
  • Redirects
  • Overview
  • Honeypot Field
  • reCAPTCHA
  • Cloudflare Turnstile
  • hCaptcha
  • ALTCHA
  • Overview
  • Application Forms
  • Form Submissions
  • Webhooks
  • Auto Responders
  • Custom Email Templates
  • AI Reply
  • CC Emails
  • Branding & Custom Domain
  • File Uploads
  • Domain Restriction
  • Custom Subjects
  • Reply-To Address
  • Overview
  • Slack
  • Discord
  • Make
  • n8n
  • Google Sheets
  • Notion
  • Airtable
  • Overview
  • React
  • Next.js
  • Vue.js
  • Angular
  • Svelte
  • Astro
  • Plain HTML
  • Netlify
  • Vercel
  • Cloudflare Pages
  • GitHub Pages
  • WordPress
  • Webflow
  • Wix
  • Complete Reference
  • Account Settings
  • Pricing Plans
  • Overage Billing
  • Common Issues
  • Debugging
  • CORS Issues
  • Email Delivery
  • FAQ
  • Get Support
  • Changelog
Static Forms - Secure form backend and form endpoint for contact formsStatic Forms - Secure form backend and form endpoint for contact forms

The fastest way to add working contact forms to any website. No backend required.

Product

  • Features
  • Pricing
  • Documentation
  • Changelog

Resources

  • Blog
  • Examples
  • Templates
  • Tools
  • Integrations
  • reCAPTCHA Guide
  • FAQ

Alternatives

  • All Alternatives
  • Formspree
  • Netlify Forms
  • Typeform
  • Formspark

Company

  • Contact
  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • DPA

© 2026 Static Forms. All rights reserved.

Committed to sustainability