=== StickEasy Protected Contact Form ===
Contributors: Kasuga16
Tags: contact form, simple, easy, shortcode, minimal
Requires at least: 6.3
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.2.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Just drop the shortcode on any page - your super simple, hassle-free contact form is ready!

== Description ==

**StickEasy Protected Contact Form** is the fastest way to get a functional contact form on your WordPress site. This plugin is focused on **simplicity and speed**, allowing you to create a minimal contact form by simply placing a shortcode on any page.

There's no complex setup or field builder. Just install, place the shortcode, and start receiving messages.

As an added benefit, the form includes **built-in basic spam protection** (nonce verification, a honeypot field, submission time validation, a bad words filter, and a human interaction check) to keep most automated bots away without the need for CAPTCHAs or third-party services.

---

== Installation ==

1.  Navigate to **"Plugins"** -> **"Add New"** in your WordPress admin dashboard.
2.  Search for "StickEasy Protected Contact Form" or upload the plugin files.
3.  Install and activate the plugin.

---

== Usage ==

### 1. Simple Setup (Shortcode)

To instantly add the contact form, insert the following shortcode into any **post** or **page**:

**`[spcf_form]`**

### 2. Basic Customization

You can adjust the basic form behavior from **Settings** → **StickEasy Contact**.
The following options are available:

**Contact Form Settings**

* Edit Form Labels

 * Customize the visible labels for each field (**Name, Email, Subject, Message**) to match your website's tone or language.
**NOTE:** Basic HTML such as `<strong>` or `<br>` can be used for emphasis or formatting.

* Toggle the Name field on or off with a single checkbox. Useful when you prefer a shorter form or want to accept anonymous messages.

* Specify the **recipient email address** for messages.
**By default, messages are sent to the Administration Email Address** set in your WordPress settings ("Settings" → "General").


* Custom Success Message

  * Edit the message shown after the form is successfully submitted.
You can also use simple HTML formatting, such as `<br> `for line breaks.
Example: "Thank you!`<br>`We will get back to you within 2 business days."

* Maximum Form Width

  * Set a maximum width for the form in pixels (e.g. `600`).
This prevents the form from stretching across the full width of the page on large screens, keeping it compact and readable.
Enter `0` to use the full available width.
On smaller screens such as smartphones, the form will automatically shrink to fit the screen regardless of this setting.

* Form Alignment

  * Choose whether the form is aligned to the **left** or **center** of the page.
Takes effect when **Maximum Form Width** is set to a value greater than `0`.

**Spam Protection Settings**

 * Enable or disable all built-in spam protection features at once.
Included protections: **Honeypot, Submission Time Check, Forbidden Word Filter, and Human Interaction Check**.

 * Minimum Submission Time
Set the minimum number of seconds a visitor must remain on the page before submitting.
A value between 3 and 10 seconds is generally recommended.

 * Forbidden Word Filter
Add blocked words, domains, email patterns, or IP addresses to prevent spam submissions.
 **Note:**
The Forbidden Word Filter list also applies to the visitor's email address, subject and IP address, not just the message body.
 Examples:
　`viagra`
　`bit.ly`
　`visitor@email.com`
　`123.45.67.89`

---

== Frequently Asked Questions ==

### Q. Can I customize the styles for labels, input fields, and buttons?

A. Yes, you can.
Each element has its own **CSS class** assigned:

* Label: **`spcf-label`**
* Input fields: **`spcf-input`** (name and email fields), **`spcf-textarea`** (message textarea)
* Submit button: **`spcf-button`**
* Messages: **`spcf-success-message`** for successful submissions, **`spcf-error-message`** for error messages

By modifying the CSS for these classes, you can freely customize the appearance to match your preferred design.

---

== Screenshots ==
1. Shortcode in the editor.
2. Contact page screenshot.

---

== Changelog ==
= 1.2.0 =
* New: Added a Subject field (with Use/Require options, same as the Name field).
* Improvement: The sender's subject is now included in the notification email body, and used as-is as the notification's own subject line (falls back to the default subject when left blank).

= 1.1.0 =
* New: Added Maximum Form Width setting to limit form width in pixels.
* New: Added Form Alignment setting to align the form left or center.
* Improvement: Refactored code to remove redundant processing and improve maintainability.

= 1.0.4 =
* Minor code cleanup.

= 1.0.3 =
* Enhanced spam protection.

= 1.0.2 =
* Security fix: Hardened log directory access via .htaccess and index.html.
* Security fix: Randomized log filenames to prevent path guessing.

= 1.0.1 =
* Security fix: Moved spam logs to a non-public directory.

= 1.0.0 =
* Initial Release.