Documentation

FormDuo Documentation

Learn how to set up form endpoints, integrate forms into your website, and manage submissions with FormDuo.

Getting Started

FormDuo makes it easy to collect form submissions from any website. Follow these steps to get started in minutes.

1

Create an Account

Sign up for a free FormDuo account to get started. No credit card required.

2

Create a Form Endpoint

In your dashboard, create a new endpoint by entering the email address where you want to receive submissions.

3

Verify Your Email

Check your inbox for a verification email and click the link to activate your endpoint.

4

Add Form to Your Website

Copy your unique endpoint URL and use it as the form action in your HTML.

AI Prompt for FormsFree

Create forms instantly using AI. Generate a ready-to-use prompt for ChatGPT, Claude, or any AI assistant to build custom forms that work seamlessly with FormDuo.

How It Works

  1. Go to AI Prompt from your dashboard
  2. Select your form endpoint
  3. Describe the fields you need (e.g., "contact form with name, email, phone, message")
  4. Choose your redirect preference (FormDuo Thank You page, custom URL, or no redirect)
  5. Copy the generated prompt
  6. Paste it into ChatGPT, Claude, or any AI assistant
  7. Get production-ready HTML, React, Vue, or any framework code

Why Use AI Prompt?

  • Fast: Create complex forms in seconds, not hours
  • Flexible: Works with any AI platform (ChatGPT, Claude, Gemini, etc.)
  • Any Framework: Get code for HTML, React, Vue, Next.js, and more
  • Pre-configured: Forms are automatically set up with your FormDuo endpoint
  • Free for Everyone: Available on all plans, including Free

What's Included in the Prompt

  • • Your endpoint URL and API details
  • • Field requirements you specify
  • • Redirect configuration (thank you page or custom URL)
  • • File upload support (for Plus/Pro plans)
  • • Best practices for form validation and styling

Tip: The more specific you are about your form fields, the better the AI-generated code will be. Include field types, validation rules, and styling preferences in your description.

Form Endpoints

A form endpoint is a unique URL that receives your form submissions. Each endpoint is linked to an email address for notifications.

Creating an Endpoint

From your dashboard, click "Create New Endpoint" and enter the email address where you want to receive form submissions.

Your endpoint URL will look like:https://formduo.com/api/submit/your-endpoint-id

Email Verification

For security, each endpoint email must be verified before it can receive submissions. Check your inbox for the verification link after creating an endpoint.

HTML Integration

Add FormDuo to any HTML form by setting the form action to your endpoint URL.

Basic Example

html
<form action="https://formduo.com/api/submit/YOUR_ENDPOINT_ID" method="POST">
  <label for="name">Name</label>
  <input type="text" id="name" name="name" required />

  <label for="email">Email</label>
  <input type="email" id="email" name="email" required />

  <label for="message">Message</label>
  <textarea id="message" name="message" required></textarea>

  <button type="submit">Send Message</button>
</form>

Supported Content Types

application/x-www-form-urlencoded- Standard HTML forms
multipart/form-data- Forms with file inputs
application/json- AJAX/Fetch requests

AJAX Example

javascript
fetch("https://formduo.com/api/submit/YOUR_ENDPOINT_ID", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    name: "John Doe",
    email: "john@example.com",
    message: "Hello from JavaScript!"
  }),
})
.then(response => response.json())
.then(data => console.log("Success:", data))
.catch(error => console.error("Error:", error));

Custom Redirect

Add a hidden field to redirect users to a custom page after submission:

html
<form action="https://formduo.com/api/submit/YOUR_ENDPOINT_ID" method="POST">
  <!-- Add this hidden field for custom redirect -->
  <input type="hidden" name="_redirect" value="https://yoursite.com/thank-you" />

  <!-- Your form fields -->
  <input type="text" name="name" required />
  <input type="email" name="email" required />

  <button type="submit">Submit</button>
</form>

Thank You PagesPlus/Pro

Customize the confirmation page users see after submitting your forms. Create branded, professional thank you pages without any coding.

Plan Features

Free:Default page with FormDuo branding
Plus:Custom design, no branding, 13 templates
Pro:Custom design, no branding, 13 templates

Customization Options

  • • Custom headline and message text
  • • Background, text, and accent colors
  • • Your logo (via URL)
  • • Back button with custom URL
  • • Social media links (Twitter, Facebook, LinkedIn, Instagram)
  • • Show/hide submission reference ID

How It Works

After a form submission, users are automatically redirected to your customized thank you page:

text
https://formduo.com/thank-you/YOUR_ENDPOINT_ID?sid=SUBMISSION_ID

Native HTML Forms

Standard HTML forms automatically redirect to the thank you page after submission:

html
<form action="https://formduo.com/api/submit/YOUR_ENDPOINT_ID" method="POST">
  <input type="text" name="name" required />
  <input type="email" name="email" required />
  <button type="submit">Send</button>
</form>

JavaScript/Fetch Integration

For AJAX forms, handle the redirect URL from the API response:

javascript
const response = await fetch("https://formduo.com/api/submit/YOUR_ENDPOINT_ID", {
  method: "POST",
  body: formData
});

if (response.ok) {
  const data = await response.json();

  // Redirect to the Thank You page
  if (data.redirectUrl) {
    window.location.href = data.redirectUrl;
  }
}

API Response

The submission API returns a JSON response with the redirect URL:

json
{
  "success": true,
  "message": "Form submitted successfully",
  "submissionId": "abc123...",
  "redirectUrl": "https://formduo.com/thank-you/YOUR_ENDPOINT_ID?sid=abc123..."
}

Tip: Design your thank you page from the dashboard by clicking the "Thanks" button on any endpoint. Use templates for quick setup or customize every detail.

Submission ControlFree

Control when your forms accept submissions with scheduling and quotas. Perfect for limited-time offers, event registrations, surveys with response limits, and seasonal campaigns.

Free for Everyone! Submission Control functionality (scheduling and quotas) is available on all plans, including Free. Paid plans unlock custom colors, logos, and templates for the closed page.

Schedule Your Forms

Set start and end dates to control exactly when your form accepts submissions.

  • Start Date: Form won't accept submissions before this time
  • End Date: Form automatically closes after this time
  • Timezone Aware: Dates are handled in your local timezone

#Submission Limits (Quotas)

Cap the total number of submissions your form accepts.

  • • Set a maximum number of submissions
  • • Track current count in real-time
  • • Reset count anytime from the dashboard
  • • Perfect for limited spots, giveaways, or surveys

Closed Page Customization

When a form is closed, visitors see a customizable "Form Closed" page with your message.

All Plans:Custom messages for each scenario
Plus/Pro:Custom colors, logo, templates, no branding

Closed Page Scenarios

Customize different messages for each scenario:

not_startedForm hasn't reached the start date yet
expiredForm has passed the end date
quota_reachedForm has reached the submission limit
quota_and_expiredBoth quota reached and form expired

How It Works

No code changes required! When a form is closed, FormDuo automatically redirects visitors to the closed page:

text
https://formduo.com/form-closed/YOUR_ENDPOINT_ID?reason=expired

For AJAX/Fetch Forms

The same redirect code you use for Thank You pages also handles Closed pages automatically:

javascript
const response = await fetch("https://formduo.com/api/submit/YOUR_ENDPOINT_ID", {
  method: "POST",
  body: formData
});

if (response.ok) {
  const data = await response.json();

  // This handles BOTH Thank You page AND Closed Page redirects
  if (data.redirectUrl) {
    window.location.href = data.redirectUrl;
  }
}

API Response (Form Closed)

When a form is closed, the API returns:

json
{
  "success": false,
  "closed": true,
  "reason": "expired",
  "message": "This form is no longer accepting submissions",
  "redirectUrl": "https://formduo.com/form-closed/YOUR_ENDPOINT_ID?reason=expired"
}

Message Variables

Use these placeholders in your custom messages to show dynamic information:

{startDate}The form's start date
{endDate}The form's end date
{current}Current submission count
{max}Maximum submissions allowed

Example message: "We've received {current} of {max} responses. Thanks for your interest!"

Tip: Configure Submission Control from the dashboard by clicking the "Limits" button on any endpoint. You can enable/disable scheduling and quotas independently.

Spam Protection

FormDuo provides multiple layers of protection against spam and bot submissions. Configure these settings from your dashboard for each endpoint.

1Honeypot FieldsRecommended

Honeypot fields are hidden inputs that humans can't see but bots fill out automatically. If a submission contains data in the honeypot field, it's silently rejected.

Enabled by default for all endpoints. Add this hidden field to your form:

html
<!-- Add this hidden honeypot field to your form -->
<input type="text" name="_honeypot" style="display:none" tabindex="-1" autocomplete="off">

2Rate LimitingRecommended

Limits the number of submissions per IP address to prevent abuse. Default: 10 submissions per minute per IP.

Enabled by default. You can customize the rate limit in your endpoint's spam protection settings.

3Daily Submission Limits

Each plan has a daily submission limit to prevent abuse:

Free:50/day
Plus:500/day
Pro:Unlimited

4CAPTCHA Verification

Add CAPTCHA verification to your forms for maximum protection. FormDuo supports:

Google reCAPTCHA v2 - Checkbox verification
Google reCAPTCHA v3 - Invisible score-based verification
hCaptcha - Privacy-focused alternative

Configure CAPTCHA in your endpoint's spam protection settings with your site key and secret key.

reCAPTCHA v2 Example

html
<!-- Include reCAPTCHA script in your page head -->
<script src="https://www.google.com/recaptcha/api.js" async defer></script>

<form action="https://formduo.com/api/submit/YOUR_ENDPOINT_ID" method="POST">
  <input type="text" name="name" required />
  <input type="email" name="email" required />
  <textarea name="message" required></textarea>

  <!-- Add reCAPTCHA widget -->
  <div class="g-recaptcha" data-sitekey="YOUR_SITE_KEY"></div>

  <button type="submit">Send</button>
</form>

reCAPTCHA v3 Example (Invisible)

html
<script src="https://www.google.com/recaptcha/api.js?render=YOUR_SITE_KEY"></script>

<form id="myForm" action="https://formduo.com/api/submit/YOUR_ENDPOINT_ID" method="POST">
  <input type="hidden" name="g-recaptcha-response" id="recaptchaResponse">
  <input type="text" name="name" required />
  <input type="email" name="email" required />
  <button type="submit">Send</button>
</form>

<script>
document.getElementById('myForm').addEventListener('submit', function(e) {
  e.preventDefault();
  grecaptcha.ready(function() {
    grecaptcha.execute('YOUR_SITE_KEY', {action: 'submit'}).then(function(token) {
      document.getElementById('recaptchaResponse').value = token;
      e.target.submit();
    });
  });
});
</script>

hCaptcha Example

html
<!-- Include hCaptcha script -->
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>

<form action="https://formduo.com/api/submit/YOUR_ENDPOINT_ID" method="POST">
  <input type="text" name="name" required />
  <input type="email" name="email" required />

  <!-- Add hCaptcha widget -->
  <div class="h-captcha" data-sitekey="YOUR_SITE_KEY"></div>

  <button type="submit">Send</button>
</form>

Tip: For most websites, honeypot fields + rate limiting provide excellent protection. Add CAPTCHA only if you're experiencing persistent bot attacks.

File UploadsPlus/Pro

Accept file uploads in your forms. Files are securely stored and accessible via download links in your dashboard and email notifications.

Plan Limits

Free:File uploads not available
Plus:Up to 10MB per file
Pro:Up to 50MB per file

Blocked File Types

For security reasons, the following file types are blocked:

.exe, .msi, .bat, .cmd, .sh, .ps1, .vbs, .js, .jar, .app, .dmg, .iso, .scr, .com

Free Plan Users

If a form with file inputs is submitted on a Free plan, the submission will still be received but file attachments will be skipped. Upgrade to Plus or Pro to receive file uploads.

HTML Example with File Upload

html
<form action="https://www.formduo.com/api/submit/YOUR_ENDPOINT_ID"
      method="POST"
      enctype="multipart/form-data">

  <label for="name">Name</label>
  <input type="text" id="name" name="name" required />

  <label for="email">Email</label>
  <input type="email" id="email" name="email" required />

  <label for="resume">Upload Resume</label>
  <input type="file" id="resume" name="resume" accept=".pdf,.doc,.docx" />

  <button type="submit">Submit</button>
</form>

Important: Make sure to include enctype="multipart/form-data" in your form tag for file uploads to work.

AJAX File Upload

javascript
const form = document.getElementById('myForm');
const formData = new FormData(form);

fetch("https://www.formduo.com/api/submit/YOUR_ENDPOINT_ID", {
  method: "POST",
  body: formData  // Don't set Content-Type header - browser sets it automatically
})
.then(response => response.json())
.then(data => console.log("Success:", data))
.catch(error => console.error("Error:", error));

Webhooks

Send form submissions to external services in real-time. Connect your forms to Slack, Discord, Zapier, or any custom API endpoint.

Setting Up Webhooks

From your dashboard, click the webhook icon on any verified endpoint. Add a webhook URL where you want to receive submissions. You can add multiple webhooks per endpoint based on your plan.

Webhook Limits by Plan

Free:1 webhook per endpoint
Plus:3 webhooks per endpoint
Pro:Unlimited webhooks

Webhook Payload

When a form is submitted, FormDuo sends a POST request to your webhook URL with the following JSON payload:

json
{
  "endpointId": "abc123",
  "submittedAt": "2024-01-15T10:30:00.000Z",
  "data": {
    "name": "John Doe",
    "email": "john@example.com",
    "message": "Hello from FormDuo!"
  }
}

Popular Integrations

Slack

Use Slack's Incoming Webhooks to post form submissions to any channel.

Discord

Create a Discord webhook to receive submissions in your server.

Zapier

Use Zapier's Webhooks trigger to connect to 5,000+ apps.

Make (Integromat)

Create powerful automations with Make's webhook module.

Custom API Example

Here's how to receive webhooks in your own API endpoint:

javascript
// Express.js example
app.post("/webhook/formduo", (req, res) => {
  const { endpointId, submittedAt, data } = req.body;

  console.log("New submission from:", data.email);
  console.log("Message:", data.message);

  // Process the submission (save to DB, send notification, etc.)

  res.status(200).json({ received: true });
});

Form BuilderPro

The Visual Form Builder lets you design beautiful forms without writing code. Available exclusively for Pro plan users.

Drag & Drop

Add fields by clicking, then drag to reorder them. Supports text, email, phone, textarea, select, checkbox, radio, and more.

Custom Styling

Customize colors, fonts, spacing, border radius, and shadows to match your brand.

Pre-built Templates

Start with professionally designed templates for contact forms, feedback, support requests, and more.

Export HTML

Export your form as clean, ready-to-use HTML code that you can paste into any website.

Pro Feature: The Form Builder is available exclusively on the Pro plan ($9.99/month).

View pricing

Submissions

View and manage all your form submissions from the dashboard.

Email Notifications

Receive instant email notifications when someone submits your form. Emails include all form data.

Submission History

View all submissions in your dashboard. Click on any submission to see the full details.

Export to CSV

Export your submissions to CSV format for use in spreadsheets, databases, or other tools.

Plans & Limits

Choose the plan that fits your needs. All plans include core features.

FeatureFreePlusPro
Form Endpoints15Unlimited
Daily Submissions50500Unlimited
Webhooks per Endpoint13Unlimited
File Uploads-10MB/file50MB/file
Email Notifications
Submission History
Export to CSV
AI Prompt for Forms
Submission Control (Scheduling & Quotas)
Custom Thank You Pages-
Visual Form Builder--
PriceFree$4.99/mo$9.99/mo