Getting Started
Installation & Usage

Installation

Getting started with Formail is easy and flexible. You can integrate Formail into your applications either by using our convenient formail-hooks package or by making a POST request. Below, you'll find instructions for both methods.

Obtaining Your Form ID

Before integrating Formail, you'll need a unique Form ID for your form. Here's how to obtain it:

Log in to your dashboard:

Visit Formail Dashboard (opens in a new tab).

Create a new form:

If you haven't already created a form, you can do so by clicking the "Create New Form" button.

Copy your Form ID:

Once your form is created, you'll find a Form ID associated with it. Copy this ID as you will need it for the integration process.

Using formail-hooks

For a more streamlined integration, you can utilize our formail-hooks package.

Installation

First, install the package via npm:

npm install formail-hooks

Usage

Here's how to use the hook in a React component:

import { useFormail } from 'formail-hooks';
 
const MyComponent = () => {
  const { handleSubmit } = useFormail('<YOUR_FORM_ID>');
 
  return (
    <form onSubmit={handleSubmit}>
      <input type='email' name='email' required />
      <textarea name='message' required></textarea>
      <button type='submit'>Send</button>
    </form>
  );
};

Explore More Examples

For more alternative ways to set up your forms visit our Examples Overview