Forms

Collect form submissions from your static sites without a backend. Get email notifications when forms are submitted.

Overview

ZeroDeploy Forms lets you collect form submissions from your static sites without setting up a backend. Forms are automatically created when visitors submit to /_forms/<name> endpoints.

How It Works

  1. Add a form to your HTML pointing to /_forms/<name>
  2. Visitors submit the form
  3. ZeroDeploy stores the submission
  4. Get email notifications (optional)
  5. View and export submissions via CLI or dashboard

Example Form

html
<form action="/_forms/contact" method="POST">
  <input type="text" name="name" required>
  <input type="email" name="email" required>
  <textarea name="message"></textarea>
  <button type="submit">Send</button>
</form>

After submission, visitors are redirected back to the referring page with ?success=true appended.

form list

List all forms for a site, showing submission counts.

zerodeploy form list [options]

OptionDescription
--site <site>Site (defaults to config/env)
--jsonOutput as JSON for scripting
bash
zerodeploy form list

Example output:

text
Forms:

  NAME                          SUBMISSIONS  CREATED
  ------------------------------------------------------------
  contact                               42  12/15/2025
  waitlist                             156  12/10/2025
  newsletter                            89  12/1/2025

form submissions

View recent form submissions in the terminal.

zerodeploy form submissions <name> [options]

ArgumentDescription
nameForm name (e.g., "contact", "waitlist")
OptionDescription
--site <site>Site (defaults to config/env)
--limit <n>Number of submissions to show (default: 10)
--offset <n>Offset for pagination (default: 0)
--jsonOutput as JSON for scripting
bash
# View last 10 submissions (default)
zerodeploy form submissions contact

# View more submissions with pagination
zerodeploy form submissions contact --limit 20 --offset 20

Example output:

text
Form: contact
Total submissions: 42

Showing 1-10 of 42

  abc12345  12/15/2025, 3:45:00 PM
    name: John Doe
    email: john@example.com
    message: Hello, I'd like to learn more about...
    [IP: 192.168.1.1, from: https://example.com/contact]

  def67890  12/15/2025, 2:30:00 PM
    name: Jane Smith
    email: jane@example.com
    message: Quick question about pricing...

View more with: --offset 10

Export all to CSV with:
  zerodeploy form export contact

form export

Export all submissions for a form as a CSV file.

zerodeploy form export <name> [options]

ArgumentDescription
nameForm name (e.g., "contact", "waitlist")
OptionDescription
--site <site>Site (defaults to config/env)
-o, --output <file>Output file path (default: <name>-submissions.csv)
bash
# Export to default file (contact-submissions.csv)
zerodeploy form export contact

# Export to custom file
zerodeploy form export contact -o leads.csv

The CSV includes all form fields plus metadata:

form delete

Delete a form and all its submissions. This action cannot be undone.

zerodeploy form delete <name> [options]

ArgumentDescription
nameForm name (e.g., "contact", "waitlist")
OptionDescription
--site <site>Site (defaults to config/env)
--forceSkip confirmation prompt
bash
# Delete with confirmation prompt
zerodeploy form delete contact

# Delete without confirmation
zerodeploy form delete contact --force

Warning: This permanently deletes the form and all its submissions. This action cannot be undone.

form notify

Configure email notifications for form submissions. Get notified instantly when visitors submit a form.

zerodeploy form notify <name> [options]

ArgumentDescription
nameForm name (e.g., "contact", "waitlist")
OptionDescription
--site <site>Site (defaults to config/env)
--email <email>Email address to receive notifications
--disableDisable email notifications
bash
# Enable notifications for a form
zerodeploy form notify contact --email alerts@example.com

# Disable notifications
zerodeploy form notify contact --disable

When enabled, you'll receive an email with the submission data each time a visitor submits the form. The email includes all form fields and a link to view submissions in the dashboard.

Spam Prevention

ZeroDeploy includes built-in spam prevention:

Rate Limiting

Each IP is limited to 10 submissions per minute per site. Exceeding this limit returns a rate limit error.

Honeypot Fields

Add hidden fields with names starting with _hp to your form. Any _hp-prefixed field that gets filled in (by a bot) triggers a silent rejection with a fake success response. Use realistic names like _hp_website or _hp_url to tempt bots into filling them.

html
<form action="/_forms/contact" method="POST">
  <!-- Honeypot fields: hidden from users, tempting to bots -->
  <div style="position:absolute;left:-9999px" aria-hidden="true">
    <input type="text" name="_hp_website" tabindex="-1" autocomplete="off">
  </div>

  <input type="text" name="name" required>
  <input type="email" name="email" required>
  <button type="submit">Send</button>
</form>

Use position: absolute; left: -9999px instead of display: none — some bots detect display: none and skip those fields. All _hp-prefixed fields are stripped from submission data and never stored.

Limits

Form submissions are subject to plan limits:

PlanSubmissions/Month
Free100 per site
Paid10,000 per site

Submissions exceeding the limit will return an error until the next billing cycle.