=== Gravity Forms Termageddon Add-On ===
Contributors: gravityforms
Tags: gravity forms, termageddon, consent, privacy, terms
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 0.1.0-alpha.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds a Termageddon Consent field to Gravity Forms with auto-updating policy links and consent version logging.

== Description ==

This add-on adds a **Termageddon Consent** field type to Gravity Forms. The field renders a checkbox whose label includes linked policy names (Privacy Policy, Terms of Service, Cookie Policy, etc.) pulled from your site's Termageddon policy pages. When a user submits the form, the add-on records a consent snapshot (policy version hash, timestamp, and URLs) on the entry.

**This add-on is not a cookie consent banner.** It does not configure or replace the Termageddon Usercentrics cookie consent tool. It is a form-level consent and policy acknowledgment tool for Gravity Forms.

= Requirements =

Before the add-on can discover policies and work as expected, your site needs **all** of the following:

1. **Gravity Forms** 2.7 or newer
2. **Termageddon: Cookie Consent & Privacy Compliance** WordPress plugin (`termageddon-usercentrics`) — installed and active
3. A **Termageddon account** with the policies you need (Privacy, Terms, Cookie Policy, etc.)
4. **WordPress policy pages** — for each policy, a published Page containing the Termageddon **embed code** from [policies.termageddon.com](https://policies.termageddon.com) (Custom HTML block with `data-policy-key="..."`)

= What happens automatically =

* Scans published pages for Termageddon policy embed codes
* Builds linked policy names in the consent checkbox label
* Records consent version snapshots (MD5 hash + UTC timestamp) on form submission
* Shows admin notices if dependencies or policy pages are missing

= What you still configure manually =

* Create each policy page in WordPress and paste the embed code from your Termageddon dashboard (standard Termageddon setup)
* In the Gravity Forms editor, add a **Termageddon Consent** field and select which policies to include
* Optional: adjust the default label template under Forms → Settings → Termageddon

= Important: cookie plugin vs. policy pages =

Installing and configuring the Termageddon **cookie consent** plugin does **not** by itself create Privacy Policy, Terms, or Cookie Policy **pages**. Those are separate pages with separate embed codes from your Termageddon account. This add-on discovers policies from those pages — not from the cookie banner settings alone.

== Installation ==

1. Install and activate **Gravity Forms** and **Termageddon: Cookie Consent & Privacy Compliance**
2. In your Termageddon account, copy the embed code for each policy you need
3. Create a WordPress Page for each policy (e.g. `/privacy-policy/`, `/terms-of-service/`) and paste the embed code in a Custom HTML block
4. Upload and activate this add-on
5. Edit a form → add the **Termageddon Consent** field (Advanced Fields) → select policies → save

== Frequently Asked Questions ==

= Do I paste embed codes into this add-on? =

No. Paste embed codes into WordPress **Pages**, as you normally would with Termageddon. This add-on finds them automatically.

= Why does the form editor say no policies are configured? =

Usually because no published page contains a Termageddon embed with `data-policy-key`. Create or update your policy pages first.

= Does the cookie banner plugin supply my Privacy Policy link? =

No. The cookie consent plugin and policy page embeds serve different purposes. You need dedicated policy pages with Termageddon embed codes.

= Where is the consent record stored? =

In Gravity Forms entry meta (`termageddon_consent_snapshot`), viewable in the **Termageddon Consent Record** meta box on the entry detail page.

== Changelog ==

= 0.1.0-alpha.1 =
* Initial Labs release
