JavaScript

JavaScript contact form for any website

Add a JavaScript contact form to your website with the FormsReach SDK. No custom submit handler, no serverless route, no DIY email pipeline. Deliver submissions by email with spam filtering and to WhatsApp in seconds, metered with monthly credits.

FormsReach

Online

Name: Jessica Miller

Phone: +1 (415) 555-01XX

Message: “Need a quote for a 2-bed apartment remodel in Austin. Budget around $15k.”

Set up FormsReach with JavaScript

  1. 1

    Get your API key

    Create an account at FormsReach and copy your API key.

  2. 2

    Add the CDN script and init

    Include the official browser build from unpkg (@formsreach/js), then call FormsReach.init({ apiKey: 'YOUR_API_KEY' }).

  3. 3

    Mark the form

    Add data-formsreach on your form. Use named inputs (name, email, message). Submit a test and verify email and/or WhatsApp delivery.

JavaScript snippet

JavaScript
<script src="https://unpkg.com/@formsreach/js/dist/formsreach.min.js"></script>

<script>
  FormsReach.init({ apiKey: 'YOUR_API_KEY' });
</script>

<form data-formsreach>
  <input type="text" name="name" required>
  <input type="email" name="email" required>
  <textarea name="message" required></textarea>
  <button type="submit">Submit Form</button>
</form>

Why add a small JS SDK?

Some sites want client-side submit handling without standing up their own API route. The FormsReach browser SDK posts to the same form backend as the HTML action endpoint, so you stay off the email-only mailto path and off custom serverless.

Platform notes

Troubleshooting

What you get

Free

500 credits every month for form submissions, email, and WhatsApp. Spam filtering, webhooks, and workflow rules included. No credit card required.

Starter & Pro

Larger monthly credit pools (2,000 or 8,000) for growing sites and multi-site volume. Same channels - email, WhatsApp via the official Meta API, webhooks. See pricing.

FAQ

Where is the official JS package?+

https://github.com/formsreach/sdk - browser build via unpkg: https://unpkg.com/@formsreach/js/dist/formsreach.min.js

How is this different from the plain HTML form?+

HTML POST works with zero JavaScript. The JS SDK is for progressive enhancement and client-side submit handling with the same FormsReach backend.

Does Free include WhatsApp and email?+

Free includes email, webhooks, and workflow rules with 500 credits every month. WhatsApp is available on Pro and Agency.

Can I use npm instead of the CDN?+

Yes - the monorepo ships @formsreach/js. The marketing snippet uses the CDN for the fastest copy-paste path.

Related integrations

Ready to receive form leads?

Create a free API key. Upgrade when you need more monthly credits.