=== StackMime Forms – Contact & Quote Forms ===
Contributors: stackmime
Tags: contact form, form builder, quote form, forms, spam protection
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.0.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight contact, quote and booking forms with a simple builder. Every entry is saved, with email alerts and spam protection without puzzles.

== Description ==

**StackMime Forms** is a fast, lightweight form plugin for business websites. Build a contact form, quote request, call-back request or booking form in a minute, add it to any page with a block or a shortcode, and never lose a lead: every entry is saved in WordPress before any email is sent.

The front end is one small script and one small stylesheet, loaded only on pages that show a form. No jQuery, no page builder, no external services and no cookies.

= Features =

* **Simple form builder.** Add, edit, reorder (drag or arrow buttons) and duplicate fields, with a live preview.
* **Ready-made templates.** Contact, Quote request, Call-back request, Booking request, Feedback and a blank form.
* **12 field types.** Text, email, phone, paragraph, dropdown, single choice, checkboxes, number, date, website, consent checkbox, and heading-and-text sections.
* **Side-by-side fields.** Set any field to half width for a modern two-column layout that stacks on phones.
* **Every entry saved.** An inbox with unread, spam and trash views, search, a form filter, bulk actions and CSV export (safe to open in Excel).
* **Email alerts that work.** A clear HTML email for each entry with Reply-To set to the sender, a unique subject per entry, and a "Resend" button if delivery failed.
* **Customer auto-reply.** A confirmation email to the sender, with placeholders such as {name}, {site} and {entry}. Set it once or per form.
* **Spam protection without puzzles.** A signed one-time token, minimum time on the page, a hidden honeypot, a per-visitor rate limit and a link limit. No CAPTCHA, no third-party service.
* **Privacy-friendly.** Visitor IP addresses are never stored (only a one-way hash for rate limiting). Optional automatic deletion of old entries.
* **Accessible.** Real labels, error messages linked to their fields, keyboard-friendly builder and visible focus states.
* **Looks right in any theme.** Clean styles that use your theme's fonts and primary colour, an accent colour setting, or no styles at all.
* **Works with page caching** (LiteSpeed, WP Rocket, Cloudflare and others): forms are sent through the REST API and are never cached.
* **Block and shortcode.** Use the StackMime Form block or `[stackmime_form id="contact"]`.
* **For developers.** Register forms in code with `stackmime_forms_register()`, send from your own markup with `StackMimeForms.submit()`, and hook into `stackmime_forms_submitted`.
* **Translation-ready** and right-to-left friendly.

= StackMime Forms Pro =

The free plugin is complete and will stay that way. [StackMime Forms Pro](https://stackmime.com/plugins/stackmime-forms/?utm_source=wordpress.org&utm_medium=readme&utm_campaign=stackmime-forms) is a separate add-on for sites that need more:

* Multi-step forms
* Conditional fields
* CRM and Google Sheets integrations
* Scheduled exports and date ranges
* Priority email support

= Need something custom? =

StackMIME designs and builds custom WordPress websites, plugins and integrations. [Ask for a quote](https://stackmime.com/plugins/?utm_source=wordpress.org&utm_medium=readme&utm_campaign=stackmime-forms#custom).

= More free plugins by StackMIME =

* **StackMime Mail**: send WordPress email through Gmail or any SMTP service, with an email log. Pairs well with StackMime Forms so alerts never land in spam.
* **StackMime SEO**: titles, meta descriptions, schema, redirects and a 404 log.
* **StackMime Maintenance**: SEO-safe maintenance and coming soon pages.

== Installation ==

After activating, open **Getting started** from the plugin's menu or the Plugins screen for a short set-up guide.

1. In your dashboard go to **Plugins → Add New**, search for "StackMime Forms" and click **Install Now**, then **Activate**.
2. A ready Contact form is created for you. Open **Forms → All forms** to edit it or create another from a template.
3. Edit any page, add the **StackMime Form** block and choose your form. Or paste the shortcode shown next to the form.
4. Under **Forms → Settings**, check the address that receives new entries.

== Frequently Asked Questions ==

= Where do entries go? =

Every entry is saved under **Forms → Entries** first, then emailed to the addresses you set. If an email fails, the entry is still there and you can resend the alert.

= Email alerts don't arrive or go to spam. =

Your server's default mail is often filtered as spam. Install an SMTP plugin, such as the free StackMime Mail, and send through Gmail or your mail provider.

= Does it work with page caching? =

Yes. The form gets a fresh one-time token from the REST API when the page loads and is sent with POST, which page caches and CDNs never store.

= Is there a CAPTCHA? =

No. Spam is stopped with invisible checks that real visitors never notice. Bots get a normal-looking reply, so they learn nothing, and suspected spam is kept in the Spam view for 30 days so nothing is lost by mistake.

= Can I style the forms? =

Choose **Clean** or **No styles** under **Forms → Settings**, set an accent colour, or override the CSS custom property `--smf-accent` and the `.sm-form` classes in your theme.

= Can I add a form in PHP? =

Yes:

`add_action( 'stackmime_forms_init', function () {
	stackmime_forms_register( 'quote', array(
		'title'  => 'Quote request',
		'fields' => array(
			'name'  => array( 'label' => 'Name', 'type' => 'text', 'required' => true ),
			'phone' => array( 'label' => 'Phone', 'type' => 'tel', 'required' => true ),
		),
	) );
} );`

= What happens to my data if I delete the plugin? =

Nothing is deleted unless you switch on **Delete all forms, entries and settings when the plugin is deleted** in the settings.

== Screenshots ==

1. The form builder with live preview.
2. Start from a template: contact, quote, call-back, booking or feedback.
3. The entries inbox with search, filters and CSV export.
4. A single entry with its email alert status and a resend button.
5. Settings for email alerts, the auto-reply, styles and spam protection.
6. A form on the front end, using the theme's fonts.

== Changelog ==

= 2.0.5 =
* Security: opening an entry marks it as read only through a nonce-protected link from the entries list; other links open it read-only, with a "Mark as read" button. The welcome notice is cleared only through its own nonce-protected buttons.

= 2.0.4 =
* New: hooks for add-ons and custom code (field types, form and field attributes, the active fields of a submission, builder settings, admin tabs). Nothing changes for existing forms.
* Improved: a field type from an add-on that is switched off is kept when you save the form, and isn't shown on the site.

= 2.0.3 =
* Changed: temporary spam-protection data now uses the plugin's full prefix.

= 2.0.2 =
* Changed: requires WordPress 6.3 or later, which the StackMime Form block needs.
* New: the Getting started guide offers StackMIME's free website check.

= 2.0.1 =
* New: a Getting started guide with set-up steps, tips and answers, and a one-time welcome notice after a fresh install (no redirect).

= 2.0.0 =
* New: a simple form builder with live preview, drag-and-drop ordering and templates.
* New: the StackMime Form block.
* New: single choice, consent checkbox, website and heading-and-text fields, half-width fields and help text.
* New: a redesigned, cleaner admin with an entries inbox and a settings screen.
* New: style options (clean or none) and an accent colour.
* Improved: name, email and phone are found whatever the field keys are called.
* Fixed: forms on sites with plain permalinks.
* Improved: every screen is translation-ready.

= 1.0.5 =
* Unique notification subjects so mail apps don't merge entries into one thread.

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 2.0.2 =
Now requires WordPress 6.3 or later.

= 2.0.1 =
Adds a form builder, a block, new field types and a cleaner admin. Forms registered in code keep working unchanged.
