=== Ignizee Form Builder ===
Contributors: ignizee
Tags: form builder, contact form, multi-step form, conditional logic, stripe
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Author: ignizee
Author URI: https://ignizee.com/

Drag-and-drop form builder with multi-step forms, conditional logic, entries, Stripe and Zoho Payments, spam protection and privacy tools.

== Description ==

Ignizee Form Builder is a schema-driven form builder for WordPress. Build contact, lead, registration and payment forms visually, store and analyse entries, and keep spam out without leaving your dashboard.

= Key Features =

* **Drag-and-Drop Form Builder:** Visual schema editor with real-time preview and intuitive field arrangement.
* **Multi-Step Forms:** Break long forms into steps with Step Break fields, a progress bar, and per-step validation.
* **Full Field Suite:**
  * *Standard:* Single-line text, email, phone, number, paragraph, dropdown, checkboxes, and radio buttons.
  * *Advanced:* File uploads, date/time, address, website URL, star rating, password, hidden fields, and consent checkboxes.
  * *Layout & Flow:* Step breaks, section dividers, and custom HTML / shortcode blocks.
  * *Payments:* Fixed or user-defined amounts with Stripe Checkout or Zoho Payments.
* **Visual Styler:** Adjust typography, colors, spacing, button styles, and border radii. Fonts are bundled with the plugin and served from your own site.
* **Conditional Logic:** Show or hide fields based on user input with All / Any matching, skip logic, and branching paths.
* **Email Notifications:**
  * Templates with smart tags (`{all_fields}`, `{field:KEY}`, `{form_title}`, `{entry_id}`, `{date_submitted}`, `{user_ip}`, `{page_url}`).
  * Optional custom SMTP transport with connection testing, SPF/DMARC record checks for your sending domain, and a retry queue.
  * Conditional routing to send notifications to different teams based on form answers.
* **Stripe Payments:** Stripe Checkout sessions for one-time payments, variable amounts, subscriptions, multiple currencies, and signed webhook confirmation (`wpfs/v1/stripe-webhook`).
* **Zoho Payments:** Hosted Zoho Payments payment links (UPI, cards, net banking and other methods enabled in your account) for one-time payments, with sandbox and live accounts, server-side payment confirmation, and signed webhooks (`wpfs/v1/zoho-webhook`). Choose the gateway per form.
* **Spam Protection:**
  * Signed render token time-gating (rejects instant bot submissions).
  * Invisible honeypot field.
  * Per-IP rate limiting and lockout.
  * Disposable email domain filter (list bundled with the plugin).
  * Keyword and regex blocklists.
  * Optional Cloudflare Turnstile, Google reCAPTCHA v3, hCaptcha, Akismet, or a built-in math challenge.
* **Privacy & GDPR Tools:**
  * Integrates with the WordPress Personal Data Exporter and Eraser (Tools › Export/Erase Personal Data).
  * Retention policies that purge old entries via WP-Cron.
  * IP handling options: store plain, store an anonymised SHA-256 hash, or don't store.
  * Orphaned upload cleanup and protected upload directories.
  * Optional removal of all plugin data when the plugin is deleted.
* **Submissions & Analytics:**
  * Searchable entry list with filters and bulk actions.
  * CSV export gated by a dedicated capability.
  * View counters, submission charts, and conversion rates.
* **Block & Shortcode:**
  * Dynamic block (`wpfs/form`) with live editor preview.
  * Shortcode: `[wpfs_form id="123"]` with optional `title="false"`.
* **Developer Hooks:** Actions and filters to customise validation, entry data, email headers, and payment arguments.

Ignizee Form Builder makes no requests to external servers unless you turn on a feature that needs one. See **External services** below.

== External services ==

Ignizee Form Builder works fully on your own site by default. The services below are contacted **only** when you configure and enable them.

= Stripe (payments) =

Used to take payments through Stripe Checkout. It is used only after you enter Stripe API keys under **FormForge › Payments & Gateways** and enable payments on a form.

* **When:** A visitor submits a form with payments enabled. Your server creates a Checkout session, the visitor is redirected to Stripe to pay, and Stripe sends payment events back to your site's webhook URL.
* **Data sent:** Payment amount, currency, the product/form name, the submitter's email address (if the form has an email field mapped), the entry and form IDs, and the success/cancel return URLs on your site.
* Terms of service: https://stripe.com/legal/ssa
* Privacy policy: https://stripe.com/privacy

= Zoho Payments (payments) =

Used to take payments through Zoho Payments payment links. It is used only after you enter Zoho Payments credentials under **FormForge › Payments & Gateways** and choose Zoho Payments as the gateway on a form.

* **When:** A visitor submits a form that uses Zoho Payments. Your server gets an OAuth access token from Zoho Accounts (`accounts.zoho.in` or `accounts.zoho.com`, depending on your data center), creates a payment link on `payments.zoho.in` / `payments.zoho.com` (or `paymentssandbox.zoho.in` in test mode), and the visitor is redirected to Zoho to pay. When the visitor returns, or when Zoho sends a webhook to your site, your server reads the payment link from Zoho to confirm its status.
* **Data sent:** Your Zoho OAuth client credentials and refresh token (to Zoho Accounts only), the payment amount, currency, the product/form name, the submitter's email address (if the form has an email field), a reference made from the entry ID, the form and entry IDs, and the return URL on your site.
* Terms of service: https://www.zoho.com/in/payments/terms.html
* Privacy policy: https://www.zoho.com/privacy.html

= Cloudflare Turnstile (spam protection) =

Used only when you choose Turnstile under **Global Settings › Spam & Security** and enter keys.

* **When:** Turnstile's script (`challenges.cloudflare.com`) loads in the visitor's browser on pages that show a form. When the form is submitted, your server sends the verification token, your secret key, and the visitor's IP address to Cloudflare to verify it.
* Terms of service: https://www.cloudflare.com/website-terms/
* Privacy policy: https://www.cloudflare.com/privacypolicy/

= Google reCAPTCHA v3 (spam protection) =

Used only when you choose reCAPTCHA and enter keys.

* **When:** Google's reCAPTCHA script (`www.google.com/recaptcha`) loads in the visitor's browser on pages that show a form. When the form is submitted, your server sends the verification token, your secret key, and the visitor's IP address to Google to verify it.
* Terms of service: https://policies.google.com/terms
* Privacy policy: https://policies.google.com/privacy

= hCaptcha (spam protection) =

Used only when you choose hCaptcha and enter keys.

* **When:** hCaptcha's script (`js.hcaptcha.com`) loads in the visitor's browser on pages that show a form. When the form is submitted, your server sends the verification token, your secret key, and the visitor's IP address to hCaptcha to verify it.
* Terms of service: https://www.hcaptcha.com/terms
* Privacy policy: https://www.hcaptcha.com/privacy

= Akismet (spam protection) =

Used only when the Akismet plugin is installed and connected, and you turn on the Akismet option in FormForge.

* **When:** A form is submitted. The submission is sent to Akismet through the Akismet plugin's own API connection.
* **Data sent:** Your site URL, the visitor's IP address and browser user agent, the submitter's email address, and the submitted field values.
* Terms of service: https://akismet.com/tos/
* Privacy policy: https://automattic.com/privacy/

= DNS lookups (email deliverability check) =

When an administrator clicks **Check DNS** under **Global Settings › Email & Deliverability**, your server looks up the public SPF, DMARC and MX DNS records for your "From" email domain using the server's normal DNS resolver. No form or visitor data is sent.

== Installation ==

= From your WordPress Dashboard =
1. Go to **Plugins › Add New Plugin**.
2. Search for `Ignizee Form Builder`, or click **Upload Plugin** and select the plugin zip file.
3. Click **Install Now** and then **Activate**.
4. Open the **Ignizee Form Builder** menu in the sidebar to create your first form.

= Manual Installation via FTP =
1. Download and extract the plugin zip package.
2. Upload the `ignizee-form-builder` folder to the `/wp-content/plugins/` directory.
3. Activate **Ignizee Form Builder** from the **Plugins** screen.

== Frequently Asked Questions ==

= How do I embed a form on a page or post? =
Use either method:
* **Block Editor:** Add the **FormForge** block and select your form in the block settings.
* **Shortcode:** Paste `[wpfs_form id="123"]` (replace `123` with your form ID) into any post, page, or widget area. Use `[wpfs_form id="123" title="false"]` to hide the form title.

= How do I build a multi-step form? =
In the Form Builder, drag a **Step Break** element from the *Layout & Flow* group onto the canvas between your fields. Each Step Break starts a new step with Next and Back buttons and per-step validation.

= How do I configure Stripe payments? =
1. Go to **FormForge › Payments & Gateways**.
2. Enter your Stripe test and live secret keys.
3. In your Stripe Dashboard, add a webhook pointing to `https://yoursite.com/wp-json/wpfs/v1/stripe-webhook` that listens for `checkout.session.completed` events.
4. Copy the webhook signing secret (`whsec_...`) into FormForge.
5. Open the form's **Settings & Logic › Payments** tab, enable payments, and set the amount.

See **External services** for what is shared with Stripe.

= How do I configure Zoho Payments? =
1. In the Zoho API Console, create a Self Client and generate a refresh token with the scopes `ZohoPay.payments.CREATE,ZohoPay.payments.READ` (sandbox: `ZohoPaySandbox.payments.CREATE,ZohoPaySandbox.payments.READ`).
2. Go to **FormForge › Payments & Gateways › Zoho Payments › Manage Credentials**, choose your data center, and enter the account ID, client ID, client secret and refresh token. Sandbox and live are separate Zoho Payments accounts, each with its own credentials.
3. Click **Test Zoho** to check the credentials.
4. Optional: in Zoho Payments, add a webhook pointing to `https://yoursite.com/wp-json/wpfs/v1/zoho-webhook` for `payment_link.paid`, `payment_link.expired` and `payment_link.canceled`, and paste its signing key into FormForge.
5. In the form's **Settings & Logic › Payments** tab, enable payments and choose **Zoho Payments** as the gateway.

Zoho payment links are one-time payments; use Stripe for recurring billing. Set the store currency to one your Zoho Payments account accepts (INR for India accounts).

= Does FormForge load anything from third-party servers? =
Not by default. Fonts and icons are bundled with the plugin. External scripts and API calls happen only for services you enable yourself (Stripe, Zoho Payments, Turnstile, reCAPTCHA, hCaptcha, Akismet). See **External services**.

= Where are uploaded files stored? =
In `/wp-content/uploads/wpfs/`, organised by year and month. Files get randomised names, and direct script execution and directory browsing are blocked with `.htaccess` and `index.php` files.

= Can I conditionally show or hide fields? =
Yes. Select a field in the builder, open **Conditional Logic** in the field properties, turn it on, and add conditions (equals, contains, does not equal, is empty, and more). Hidden fields are skipped by required-field validation in the browser and on the server.

= How does personal data export and erasure work? =
FormForge registers with the WordPress privacy tools. When you process a request under **Tools › Export Personal Data** or **Tools › Erase Personal Data**, entries matching the requester's email address are included in the export or deleted. FormForge provides tools to help you handle personal data; it does not by itself make your site compliant with any law.

= What happens to my data if I delete the plugin? =
By default your forms, entries and settings are kept. To remove everything when the plugin is deleted, turn on **Delete all data on uninstall** under **Global Settings › Privacy & GDPR** first.

== Screenshots ==

1. Forms Manager with form status, shortcodes, submission counts and conversion rates.
2. Drag-and-drop Form Builder with block library and field inspector.
3. Theme Studio for styling a single form with a live preview.
4. Entries & Analytics for a form, with filters, field fill rates and CSV export.
5. Template Hub listing every pre-made form template.
6. Template Hub filtered by category, with one-click "Use Template".
7. Form Settings & Logic: header, submit button, storage and access options.
8. Global Form Styling defaults applied to every form.
9. System Diagnostics & Error Logs with filters and maintenance tools.
10. Payments & Gateway settings for Stripe Checkout, Zoho Payments, currency and offline payments.
11. Global Settings for front-end assets, alerts and log retention.

== Changelog ==

= 1.0.0 =
* Initial public release.
* Schema-driven visual form builder with standard, advanced, layout, and payment fields.
* Visual style customiser with instant preview and locally bundled fonts.
* Multi-step forms with Step Break elements and progress bar.
* Conditional logic for fields and notifications.
* Stripe Checkout integration with webhook confirmation.
* Zoho Payments integration (payment links) with sandbox/live accounts, return confirmation and signed webhooks.
* Email notifications with optional SMTP, retry queue, and DNS record checks.
* Spam protection: render tokens, honeypot, rate limits, disposable email filter, optional captcha providers.
* Privacy tools: retention auto-purge, IP hashing, WordPress personal data export/erasure, optional data removal on uninstall.
* Block (`wpfs/form`) and shortcode (`[wpfs_form]`).
* Developer hooks and filters.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
