Overview
This experimental integration is designed to help teams add clear, auditable policy consent to Gravity Forms using their existing Termageddon policy pages. Once configured, the add-on displays a consent checkbox with automatically linked policy names and records a snapshot of the applicable policy versions when the form is submitted.
This add-on supports form-level policy acknowledgment. It does not configure or replace the Termageddon cookie consent banner.
Key Features
π Automatically Linked Policies: Display links to selected Termageddon Privacy Policy, Terms of Service, Cookie Policy, Disclaimer, or EULA pages directly in the consent field.
π Automatic Policy Discovery: Find Termageddon policies from published WordPress pages containing Termageddon embed codes.
β Dedicated Consent Field: Add a customizable Termageddon Consent checkbox from the Gravity Forms Advanced Fields group.
π Flexible Consent Language: Customize the checkbox label using a {policies} placeholder and add an optional description beneath the field.
ποΈ Auditable Consent Records: Record the consent timestamp, policy URLs, policy keys, and content version hashes with each accepted submission.
ποΈ Entry-Level Visibility: Review captured policy information in the Termageddon Consent Record panel on the Gravity Forms entry detail screen.
π§© Conditional Logic Controls: Use Gravity Forms conditional logic to determine when the consent field appears.
βοΈ Configurable Defaults: Set a default consent label, choose whether new fields are required, and control how long policy content is cached.
π‘οΈ Resilient Submissions: Continue processing form submissions if policy content is temporarily unavailable, recording the version hash as unavailable instead of blocking the entry.
How It Works
- Install and activate the add-on.
- Make sure Gravity Forms and the Termageddon Usercentrics plugin are installed and active.
- Create and publish WordPress pages containing your Termageddon policy embed codes.
- Add the Termageddon Consent field to a Gravity Form.
- Select the policies that should appear in the consent statement.
- Customize the label, description, required status, and conditional logic.
- Publish the form and let the add-on automatically link the policies and record consent details with each accepted submission.
Please log in to access this content. Log in
Requirements
- WordPress 6.5 or newer
- PHP 7.4 or newer
- Gravity Forms 2.7 or newer
Documentation
Termageddon Add-On Documentation
This WordPress plugin integrates Gravity Forms with Termageddon by adding a dedicated consent field that links users to published Termageddon policy pages and records an auditable policy snapshot when consent is submitted.
Key Features
Termageddon consent field for Gravity Forms
- Adds a Termageddon Consent field to the Gravity Forms Advanced Fields group.
- Renders a checkbox with links to selected policy pages.
- Supports Privacy Policy, Terms of Service, Disclaimer, Cookie Policy, and EULA policy types.
- Supports required and optional consent fields.
- Supports Gravity Forms conditional logic.
- Displays consent as Agreed or Not agreed in entry views.
- Exports accepted consent as Agreed in Gravity Forms CSV exports.
Automatic policy discovery
- Scans published WordPress pages for Termageddon embeds containing
data-policy-key. - Uses page titles and slugs to identify the policy type.
- Can also read policy keys from supported WordPress options.
- Automatically links each policy name to its published WordPress page.
- Refreshes policy discovery when a page containing a Termageddon embed is saved.
Configurable consent labels
- Provides a site-wide default label template.
- Supports the
{policies}placeholder for linked policy names. - Allows each field to override the default label template.
- Formats multiple policy links using readable conjunctions.
- Supports an optional description displayed beneath the checkbox.
- Provides a label preview in the Gravity Forms form editor.
Example label template:
I agree to the {policies}.
Example rendered label:
I agree to the Privacy Policy and Terms of Service.
Auditable consent records
When a checked consent field is submitted, the add-on records:
- Gravity Forms field ID
- UTC consent timestamp
- Selected policy types and labels
- Published policy page URLs
- Termageddon policy keys
- MD5 hashes of the policy content available at submission time
The record is stored in Gravity Forms entry meta under:
termageddon_consent_snapshot
Administrators can review it in the Termageddon Consent Record meta box on the entry detail screen.
Reliability and graceful failure
- A failed Termageddon API request does not block form submission.
- If policy content cannot be retrieved, the version hash is recorded as
unavailable. - Corrupted consent snapshot data produces an administrator-facing error instead of a fatal error.
- Missing dependencies and missing policy pages produce dismissible WordPress admin notices.
- Policy content is cached to reduce remote requests.
What the Add-On Does Not Do
The add-on does not:
- Create or manage a cookie consent banner.
- Replace the
termageddon-usercentricsplugin. - Generate Termageddon policies.
- Create policy pages automatically in production.
- Authenticate with a Termageddon account using OAuth or API credentials.
- Read policy links exclusively from cookie banner configuration.
- Currently provide multisite support.
Requirements
Platform requirements
- WordPress 6.5 or newer
- PHP 7.4 or newer
- Gravity Forms 2.7 or newer
External requirements
- Termageddon: Cookie Consent & Privacy Compliance plugin installed and active.
- A Termageddon account with the required policies generated.
- At least one published WordPress page containing a Termageddon policy embed.
- The embed must contain a
data-policy-key="..."attribute. - The WordPress site must be able to make outbound HTTPS requests to the Termageddon policy API.
No separate API credentials are configured in this add-on. Policy keys are discovered from WordPress options or published page embeds.
Installation
- Install and activate Gravity Forms.
- Install and activate Termageddon: Cookie Consent & Privacy Compliance.
- Sign in to your Termageddon account and obtain the embed code for each policy.
- Create a published WordPress page for each policy.
- Paste each Termageddon embed into a Custom HTML block on its corresponding page.
- Upload the plugin folder to
/wp-content/plugins/gravityformstermageddon/. - Activate Gravity Forms Termageddon Add-On from the WordPress Plugins screen.
- Confirm that the add-on detects the published policy pages.
Setup: Creating Termageddon Policy Pages
Installing the Termageddon cookie consent plugin does not automatically create the policy pages required by this add-on.
For each policy:
- Sign in to the Termageddon policy dashboard.
- Copy the policy’s embed code.
- In WordPress, go to Pages β Add New.
- Give the page a descriptive title and slug, such as:
- Privacy Policy:
/privacy-policy/ - Terms of Service:
/terms-of-service/ - Cookie Policy:
/cookie-policy/ - Disclaimer:
/disclaimer/ - EULA:
/eula/
- Privacy Policy:
- Add a Custom HTML block.
- Paste the Termageddon embed code into the block.
- Verify that the embed contains
data-policy-key. - Publish the page.
The add-on scans published pages and identifies their policy types using the page title and slug.
Configuring the Add-On
Go to Forms β Settings β Termageddon.
Policy Cache TTL
Select how long fetched Termageddon policy content should be cached:
- 1 hour
- 6 hours
- 24 hours
- 7 days
The default is 24 hours.
The cache controls how frequently the add-on retrieves policy content for version hashing. Saving a page containing a Termageddon embed clears the relevant policy cache.
Default Label Template
Enter the default label used for new Termageddon Consent fields.
Use {policies} where linked policy names should appear.
Example:
I agree to the {policies}.
If the template does not contain {policies}, the add-on appends the policy links in parentheses.
Require by Default
Enable this option to make newly created Termageddon Consent fields required by default.
The setting is enabled by default.
Adding a Termageddon Consent Field
- Open the target form in Forms β Edit.
- Expand the Advanced Fields group.
- Add the Termageddon Consent field.
- Configure the field:
- Field Label: Enter the form editor and entry label.
- Policy Selection: Select one or more discovered policies.
- Label Template: Enter a field-specific template or retain the default.
- Consent Description: Optionally enter supporting text shown below the checkbox.
- Rules: Choose whether the field is required.
- Conditional Logic: Optionally control when the field is displayed.
- Visibility and CSS Class: Configure standard Gravity Forms display settings.
- Save the form.
The form editor prevents the form from being saved when a Termageddon Consent field has no selected policies.
Using the Add-On
Frontend consent flow
When the form is displayed:
- The add-on loads the policies selected in the field settings.
- It generates links to the corresponding published WordPress pages.
- It inserts those links into the field’s label template.
- The user reviews the linked policies and checks the consent box.
- If the field is required and remains unchecked, Gravity Forms displays:
You must agree to the terms before submitting.
Multiple policies
The field formats policy links according to the number selected:
- One policy:
Privacy Policy - Two policies:
Privacy Policy and Terms of Service - Three or more policies:
Privacy Policy, Terms of Service, and Cookie Policy
Optional consent fields
If the field is optional and the user does not check it:
- The form entry can still be created.
- The field displays Not agreed in the entry view.
- No consent snapshot is recorded for that field.
Multiple consent fields
A form can contain more than one Termageddon Consent field.
The add-on creates a separate snapshot record for each checked field and stores the records together in the entry meta.
Consent Records
Data recorded on submission
For each checked Termageddon Consent field, the stored record contains data in the following general structure:
field_id: Gravity Forms field IDtimestamp: UTC submission timestamppolicies: Selected policy recordstype: Policy type sluglabel: Human-readable policy nameurl: Published WordPress page URLpolicy_key: Termageddon embed keyversion_hash: MD5 hash orunavailable
The normal Gravity Forms field value is also saved as 1 when consent is accepted.
Viewing the consent record
- Go to Forms β Entries.
- Select the relevant form.
- Open the entry.
- Find the Termageddon Consent Record meta box.
The meta box displays:
- Consent timestamp in UTC
- Field ID
- Policy labels
- Policy keys
- Policy page URLs
- Policy version hashes
Only users who can view Gravity Forms entries can access the meta box.
Version hashes
The version hash is an MD5 digest of the policy content returned by the Termageddon policy API.
The hash is intended to identify the policy content available when consent was submitted. It is not used for password storage, authentication, or cryptographic signing.
If the remote content cannot be retrieved, the submission succeeds and the hash is stored as unavailable.
Policy Discovery
The add-on uses two policy discovery methods.
WordPress options
The add-on checks these policy-key options when present:
termageddon_policy_key_privacytermageddon_policy_key_termstermageddon_policy_key_disclaimertermageddon_policy_key_cookietermageddon_policy_key_eula
If a key is found, the add-on searches published pages for a matching embed to determine its URL.
Published page scanning
The add-on scans all published WordPress pages for markup containing:
data-policy-key="..."
It then infers the policy type from the page title and slug.
Recognized terms include:
privacytermsterms-of-serviceterms-of-useconditionsdisclaimercookieeulaend-user-licenselicense-agreement
If the page does not match a known policy type, the add-on generates an internal policy type based on the policy key.
Logging and Troubleshooting
Quick checks
If policy links or consent records are not working:
- Confirm WordPress, PHP, and Gravity Forms meet the minimum requirements.
- Confirm Gravity Forms is installed and active.
- Confirm the Termageddon Usercentrics plugin is installed and active.
- Confirm the required policies exist in the Termageddon account.
- Confirm each policy has a separate published WordPress page.
- Confirm each page contains an embed with
data-policy-key. - Confirm the Termageddon Consent field has at least one selected policy.
- Confirm the form has been saved after configuring the field.
- Confirm the site can make outbound HTTPS requests.
- Open the Gravity Forms entry and review the Termageddon Consent Record.
βNo policy pages were foundβ
This usually means the add-on did not find a valid Termageddon embed on a published WordPress page.
Check that:
- The page is published rather than draft or private.
- The embed is in the page content.
- The embed contains
data-policy-key. - The policy key is not empty.
- The page title or slug describes the policy type.
Saving the policy page clears the relevant add-on cache.
Policy does not appear in the field settings
The form editor displays known policy types but disables types that are not configured.
Create and publish the corresponding policy page, then reload the form editor.
Form cannot be saved
Each Termageddon Consent field must have at least one policy selected.
Open the field’s Policy Selection setting and select one or more configured policies.
Policy link points to #
The add-on could not locate a published WordPress page for that policy.
Confirm that the page contains the same policy key the add-on discovered from WordPress options or another source.
Version hash is unavailable
The Termageddon policy endpoint could not be retrieved at submission time.
Possible causes include:
- The server cannot make outbound HTTPS requests.
- The policy key is invalid.
- The Termageddon endpoint returned a non-200 response.
- The request exceeded the five-second timeout.
- SSL verification failed.
- Termageddon was temporarily unavailable.
The Gravity Forms submission is intentionally not blocked in this situation.
No consent record appears
A snapshot is recorded only when:
- The form contains a
termageddon_consentfield. - The submitted value for the field is
1. - The Gravity Forms entry has been created successfully.
Optional fields left unchecked do not generate snapshots.
Consent record cannot be read
If the stored entry metadata contains invalid JSON or an invalid record structure, the entry meta box displays a corrupted-data warning.
Inspect the termageddon_consent_snapshot entry meta value and check for manual database modifications or conflicting custom code.
Admin notices
The add-on displays notices on the Plugins and Gravity Forms administration screens when:
- Gravity Forms is missing.
- The Termageddon Usercentrics plugin is missing.
- No Termageddon policy pages can be discovered.
Notices can be dismissed per WordPress user.
Developer Notes
Main classes
- Plugin bootstrap:
gravityformstermageddon.php - Main add-on class:
GF_Termageddon_AddOn - Custom field class:
GF_Termageddon_Field - Policy discovery and API class:
GF_Termageddon_API - Consent snapshot class:
GF_Termageddon_Logger - Dependency notice class:
GF_Termageddon_Notices - Setup guidance class:
GF_Termageddon_Requirements
Main hooks
The add-on uses Gravity Forms and WordPress hooks including:
gform_loadedto register theGFAddOnimplementation.gform_after_submissionto store consent snapshots.gform_entry_detail_meta_boxesto add the consent record meta box.gform_field_standard_settingsto add field-specific settings.gform_editor_jsto register field settings in the form editor.gform_form_post_get_metato sanitize saved field properties.gform_gf_field_createto apply defaults to new fields.save_postto invalidate policy caches when policy pages are saved.
The repository does not currently define public add-on-specific developer filters.
Entry metadata
Consent snapshots are stored using:
- Meta key:
termageddon_consent_snapshot - Storage format: JSON
- Write function:
gform_update_meta() - Read function:
gform_get_meta()
Remote API behavior
Policy content is retrieved using WordPress’s wp_remote_get() with:
- HTTPS and SSL verification enabled
- Five-second timeout
- Configurable transient caching
- Non-blocking failure behavior during submission
No runtime Composer dependencies
Composer packages are development dependencies used for testing and static analysis. The production plugin runs through WordPress and Gravity Forms APIs without requiring a Composer autoloader.
Development and Verification
PHP quality checks
composer install
composer phpcs
composer phpstan
composer phpunit
composer semgrep
PHPCS uses the Gravity Forms coding standards repository and may require GitHub authentication.
Local smoke tests
With the configured LocalWP site running:
php bin/setup-local-test.php
php bin/test-submission.php
The setup script:
- Creates or updates sample policy pages.
- Runs policy discovery.
- Tests policy version retrieval.
- Creates a test Gravity Form.
- Adds a Termageddon Consent field.
The submission script:
- Creates a checked test entry.
- Runs consent snapshot logging.
- Verifies that snapshot data was stored.
- Checks the rendered field for policy links.
- Prints the entry detail URL.
The LocalWP path and MySQL socket configuration are defined in bin/lib/local-env.php and may need to be updated for another workstation.
Playwright tests
npm install
npm run test:pw:start
npm run test:pw:run
npm run test:pw:run:headed
npm run test:pw:debug
npm run test:pw:stop
The Playwright environment uses WordPress 6.7 and PHP 8.0 through @wordpress/env.
A Gravity Forms plugin build must be available under the Playwright test data directory.
Continuous integration
The repository includes GitHub Actions workflows for:
- PHPCS
- PHPStan
- PHPUnit
- Semgrep
- Playwright end-to-end tests
CI requires access to a Gravity Forms test build through the BOT_DEPLOY_TOKEN repository secret.
Uninstallation
- Deactivate Gravity Forms Termageddon Add-On from the WordPress Plugins screen.
- Delete the plugin if it is no longer required.
- Remove Termageddon Consent fields from forms if they should no longer be displayed.
- Review and remove policy pages only if they are no longer used elsewhere.
Deactivating or deleting the add-on does not automatically delete existing termageddon_consent_snapshot entry metadata. Existing consent records remain associated with their Gravity Forms entries.
Support
This is a Gravity Labs add-on and is provided as-is.
Before reporting an issue, collect:
- WordPress version
- PHP version
- Gravity Forms version
- Termageddon Usercentrics plugin version
- Gravity Forms Termageddon Add-On version
- Form configuration
- Termageddon Consent field settings
- A description of the policy page setup
- Relevant policy page slugs
- The HTTP or WordPress error associated with failed policy retrieval
- An example consent record, with sensitive information removed
- Steps required to reproduce the problem
Redact private information, policy keys, entry data, credentials, access tokens, and other secrets before sharing diagnostics.
Documentation Maintenance Notes
The repository currently contains some conflicting version requirements:
- The plugin header declares WordPress 6.5 or newer.
- Some existing documentation states WordPress 6.0 or newer.
- The active plugin version is
0.1.0-alpha.1. INSTALL.txtandDEVELOPMENT.txtcontain a1.0.0-betaheading.
These values should be normalized before publishing a release.