Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

5 Commits

Repository files navigation

PostDrop CDN 🚀

The official JavaScript client for PostDrop — a lightweight form backend that lets you receive form submissions without building APIs or configuring SMTP servers.

🌐 Website | 📖 Documentation | 🚀 Get Started

Why PostDrop?

Building a backend just to receive a contact form shouldn't be necessary.

PostDrop handles everything for you:

  • 📩 Receive submissions directly in your inbox
  • ⚡ No backend required
  • 🛡️ Built-in spam protection
  • 🔄 AJAX form submission
  • 📊 View submissions in your dashboard
  • 🎨 Custom success & error messages
  • 🌍 Works with any HTML website
  • ⚛️ Supports React, Next.js, Vite and other frontend frameworks

Perfect For

  • Portfolio Websites
  • Landing Pages
  • Static HTML Sites
  • Personal Blogs
  • Startup MVPs
  • SaaS Landing Pages
  • Frontend-only Projects
  • Indie Hackers

Installation

Add the CDN inside the <head> tag.

<scriptsrc="https://cdn.jsdelivr.net/gh/PostDropcom/Postdrop-cdn@main/postdrop.js"></script>

Quick Start

⚠️ Important

PostDrop automatically looks for a form with the ID postdrop-form.

Your form must have:

  • id="postdrop-form"
  • data-public-id="YOUR_PUBLIC_ID"

If the form ID is different, the PostDrop CDN will not detect or submit your form.

<formid="postdrop-form"
data-public-id="YOUR_PUBLIC_ID"><inputtype="text"
name="name"
placeholder="Your Name"
required><inputtype="email"
name="email"
placeholder="Your Email"
required><textareaname="message"
placeholder="Your Message"
required></textarea><buttontype="submit">
Send Message
</button></form>

That's it.

PostDrop automatically submits the form, validates the request, blocks spam, stores submissions in your dashboard, and forwards them to your inbox.


Features

  • ✅ Zero dependencies
  • ✅ Lightweight CDN
  • ✅ Works without jQuery
  • ✅ AJAX form submission
  • ✅ No page reload
  • ✅ Loading button state
  • ✅ Success message support
  • ✅ Error message support
  • ✅ Custom success message
  • ✅ Custom success color
  • ✅ Custom error color
  • ✅ Redirect after successful submission
  • ✅ Honeypot spam protection
  • ✅ Multiple forms support
  • ✅ Email notifications
  • ✅ Dashboard to manage entries

Optional Configuration

Customize the behaviour using hidden inputs.

FeatureField
Success Messagepostdrop_success_message
Success Colorpostdrop_success_color
Error Colorpostdrop_error_color
Redirect URLpostdrop_redirect_url
Honeypotpostdrop_honeypot

Example:

<inputtype="hidden"
name="postdrop_success_message"
value="🎉 Message sent successfully!"><inputtype="hidden"
name="postdrop_success_color"
value="#10b981"><inputtype="hidden"
name="postdrop_error_color"
value="#ef4444">

Spam Protection

PostDrop includes built-in honeypot spam protection.

Simply include this hidden field inside your form.

<inputtype="text"
name="postdrop_honeypot"
style="display:none"
tabindex="-1"
autocomplete="off">

Bots will usually fill this field while real users won't.


Documentation

Complete documentation, examples and guides are available here:

👉 https://postdrop.online/docs


Need React or Next.js?

PostDrop also supports:

  • React
  • Next.js
  • Vite
  • Vanilla JavaScript
  • Fetch API
  • Static HTML

Visit the documentation for framework-specific examples.


License

MIT License © PostDrop

About

The easiest headless form backend API for frontend devs. Receive form submissions directly in your inbox without building backend APIs.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages