Gravity Forms Integration
Gravity Forms is a premium WordPress form builder with advanced conditional logic, multi-page forms, and an extensive add-on ecosystem. WP Smart Consent integrates with Gravity Forms to add an opt-in checkbox to any form, with per-form configuration accessed directly inside the Gravity Forms form settings.
Enabling the Integration#
In the WP Smart Consent dashboard, go to Form Sources and toggle Gravity Forms on. Per-form behavior is then configured individually inside each form’s settings.

Per-Form Settings#
WP Smart Consent adds a WP Smart Consent tab to each form’s settings page. To access it, go to Forms → [your form] → Settings → WP Smart Consent.
Enable — tick this to activate WP Smart Consent for this form. Nothing is logged or forwarded until this is on.
Form Type — choose how the form handles consent:
- Contact form — a consent checkbox is injected above the submit button. Only submissions where the visitor ticks it are forwarded to your CRMs.
- Newsletter form — every submission is treated as an opt-in automatically. No checkbox is shown.
Field Mapping — map your form’s fields to standard WP Smart Consent data fields. Email is required for any CRM sync to fire. First Name, Last Name, Phone, Company, and Country are optional.
Field IDs in the dropdowns correspond to Gravity Forms’ internal field numbering (e.g. field #1, field #3). If you add or remove fields from the form and the field numbers change, re-open this tab and re-map.
Extra Fields — map any additional form field to a custom CRM key. Use this for custom properties in FluentCRM, MERGE tags in Mailchimp, or contact properties in HubSpot.
Click Save Settings when done. Settings are saved immediately via AJAX.
Form Type#
Contact form — WP Smart Consent prepends the consent checkbox to the submit button markup via the gform_submit_button filter. The checkbox appears immediately above the submit button and is outside Gravity Forms’ field namespace, so it passes through GF’s field processor untouched. Only submissions where the visitor ticked the checkbox are forwarded to your CRM destinations.
Newsletter form — no checkbox is injected. Every successful submission is treated as an opt-in and forwarded automatically.
Collect Fields#
Map the form’s fields to standard WPSC data fields. Gravity Forms identifies fields by their input ID — a numeric string for simple fields (e.g. 2 for a text field with ID 2) or a dotted sub-input ID for compound fields (e.g. 2.3 for the first name portion of a Name field with ID 2, and 2.6 for the last name portion). The dropdown is populated automatically from your form’s registered fields.
Email — required. First name, Last name, Phone, Company, Country — all optional.
Extra Fields#
Below the standard field selectors, the Extra fields section lets you map any additional Gravity Forms field to a custom CRM key. Select the form field on the left and enter the CRM key on the right. That key is sent alongside the standard contact data on every opt-in.
Submission Hook#
WP Smart Consent listens on gform_after_submission, which fires after every successful Gravity Forms submission and entry save. The $entry array is keyed by input ID string, so field value lookups are direct — $entry['2'] for a simple field, $entry['2.3'] for a name sub-field. Only successful, validated submissions trigger consent capture — failed or spam-filtered submissions never reach this hook.
Troubleshooting#
WP Smart Consent tab not visible in form settings — confirm the Gravity Forms integration is enabled in the WPSC dashboard. The tab is added via gform_form_settings_menu which requires Gravity Forms to be active and the form editor to be open.
Checkbox not appearing on the form — confirm the form is enabled in its WP Smart Consent settings tab. The checkbox is injected via the gform_submit_button filter. If another plugin or theme overrides the submit button markup at a higher filter priority, the checkbox may not appear.
Wrong field values forwarded — Gravity Forms name fields split into sub-inputs with dotted IDs (.3 for first name, .6 for last name). If the dropdown shows a name field as a single entry and the value is empty, re-map it to the correct sub-input ID.