=== StaticForms – Form Backend & Spam Filtering ===
Contributors: hussainanjar
Tags: contact form, form submission, elementor, contact form 7, form backend
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send WordPress form submissions to StaticForms — email delivery, spam filtering, and integrations with Slack, Mailchimp, Notion, and more.

== Description ==

[StaticForms](https://www.staticforms.dev) is a form backend for static websites and WordPress. It handles email delivery, spam filtering, webhooks, and integrations with Slack, Google Sheets, Notion, Mailchimp, and more — so you don't have to configure SMTP or maintain a mail server.

This plugin routes your existing WordPress form submissions to StaticForms, giving you a single inbox for every site you run.

**Why use this plugin?**

* **One inbox for all your sites** — WordPress, static HTML, React, Astro — all submissions land in the same place.
* **Migrate without breaking forms** — moving from WordPress to a static site? Your StaticForms endpoint stays the same. Zero form downtime.
* **Works with the form builders you already use** — no need to switch to a new form builder.
* **Reliable email delivery** — StaticForms uses dedicated sending infrastructure, so emails don't land in spam.

**Integrations included**

* **Elementor Pro** — a native "StaticForms" entry appears in the form widget's Actions After Submit. Configure it per-form with an optional API key override.
* **Contact Form 7** — forward all CF7 submissions to StaticForms with one checkbox. Works even when `wp_mail()` is unreliable.
* **Shortcode** — add `[staticforms key="YOUR_API_KEY"]` to any page or post for a ready-made contact form. No form builder required.

**StaticForms features (available after connecting)**

* Email delivery to your inbox on every submission
* Spam filtering
* Webhooks
* Integrations: Slack, Google Sheets, Notion, Mailchimp, Telegram, Discord, and more
* Submission history dashboard
* Domain allowlist to block unwanted senders

A free StaticForms account is required. Sign up at [staticforms.dev](https://www.staticforms.dev).

= Third-Party Service =

This plugin transmits form submission data (field values, sender name, email address, and message) to the StaticForms API (`https://api.staticforms.dev`), a third-party service operated by StaticForms.

Data is sent when a visitor submits a form on your site. No data is sent during plugin activation, settings changes, or admin actions — only on front-end form submit.

* [StaticForms Terms of Service](https://www.staticforms.dev/terms)
* [StaticForms Privacy Policy](https://www.staticforms.dev/privacy-policy)

By using this plugin you agree to the StaticForms Terms of Service and Privacy Policy.

== Installation ==

1. Upload the plugin ZIP via **Plugins → Add New → Upload Plugin**, then activate it.
2. Go to **Settings → StaticForms** and paste your API key (get one free at [staticforms.dev](https://www.staticforms.dev/dashboard)).
3. Pick your integration:

**Elementor Pro**
Edit your form widget → Actions After Submit → add **StaticForms**. Optionally enter a per-form API key to override the global setting.

**Contact Form 7**
Tick **"Forward Contact Form 7 submissions to StaticForms"** in Settings → StaticForms. Submissions from all CF7 forms on the site will be forwarded automatically.

**Shortcode (no form builder needed)**
Add the `[staticforms]` shortcode to any page or post:

`[staticforms key="YOUR_API_KEY" redirect="https://yoursite.com/thank-you"]`

Available shortcode attributes:
* `key` — API key (overrides the global setting)
* `redirect` — URL to redirect to after a successful submission
* `subject` — custom email subject line
* `button` — button label (default: "Send Message")

== Frequently Asked Questions ==

= Do I need an Elementor Pro licence? =

No. Elementor Pro gets a native form action, but Contact Form 7 forwarding and the `[staticforms]` shortcode work without any page builder.

= Do I need a paid StaticForms plan? =

No. The free plan includes 100 submissions per month. Paid plans remove limits and unlock additional integrations.

= What happens when I migrate away from WordPress? =

Your StaticForms endpoint and inbox stay the same. Point the form on your new static site at `https://api.staticforms.dev/submit` and submissions keep flowing — no inbox reconfiguration needed.

= Is my API key exposed to visitors? =

Elementor Pro and Contact Form 7 submissions are forwarded server-to-server, so the key never reaches the browser. The `[staticforms]` shortcode renders a plain HTML form that includes the key in the page source — the same model as any static site using StaticForms. Keys are designed to be public and are protected by domain allowlists and spam filtering on the StaticForms side.

= How do I restrict which domains can submit to my API key? =

Log in to your StaticForms dashboard and add your domain to the allowlist for that API key. Submissions from other domains will be rejected. The plugin sends your site's address with each submission, so allowlisting your WordPress domain works for Elementor Pro, Contact Form 7, and the shortcode.

= I have CAPTCHA enabled on my form and submissions are rejected =

Elementor Pro and Contact Form 7 submissions are forwarded server-to-server and cannot carry a CAPTCHA token, so a StaticForms form that requires CAPTCHA will reject them. Turn CAPTCHA off for the API key used by the plugin and rely on the domain allowlist plus built-in spam filtering instead. The `[staticforms]` shortcode renders a browser form, so it can use CAPTCHA normally.

= Where do I see my submissions? =

In your StaticForms dashboard at [staticforms.dev/dashboard](https://www.staticforms.dev/dashboard). You also receive an email for each submission.

== Screenshots ==

1. Settings page — paste your global API key once and all integrations pick it up.
2. Elementor Pro — "StaticForms" action in the form widget's Actions After Submit panel.
3. Contact Form 7 — one-click forwarding toggle in plugin settings.
4. Shortcode output — a clean, ready-to-use contact form with no page builder required.

== Changelog ==

= 1.0.0 =
* Initial release: Elementor Pro form action, Contact Form 7 forwarding, `[staticforms]` shortcode, global settings page.

== Upgrade Notice ==

= 1.0.0 =
Initial release. No upgrade steps required.
