WPForms Integration
WPForms is one of the most popular WordPress form builders, known for its drag-and-drop editor and broad add-on ecosystem. WP Smart Consent integrates with WPForms to add an opt-in checkbox to any form, with per-form configuration accessible directly inside the WPForms form builder.
Enabling the Integration#
In the WP Smart Consent dashboard, go to Form Sources and toggle WPForms on. Per-form behavior is then configured individually inside each form’s builder.

Per-Form Settings#
WP Smart Consent appears in the Marketing tab of the WPForms form builder — the same place as Kit, Constant Contact, and other marketing integrations.
To configure a form:
- Go to WPForms → All Forms → Edit on any form
- Click Marketing in the left sidebar
- Click WP Smart Consent in the list
- Click Add New Connection
From there you can configure:
- Enable — toggle to forward submissions from this form
- Form Type — Contact (shows a consent checkbox, forwards only when ticked) or Newsletter (forwards all submissions automatically)
- Field Mapping — map your form’s Email, First Name, Last Name, Phone, Company, and Country fields
- Extra Fields — map additional fields to custom CRM keys
- CRM Overrides — override the global list and tag settings per form
Settings are saved by WPForms when you click Save in the builder and stored in WPForms’ own form data.
Before per-form settings work, make sure WPForms is enabled globally under WP Smart Consent → Settings → Integrations.
Form Type#
Contact form — WP Smart Consent injects the consent checkbox via wpforms_display_submit_before, which fires immediately before the WPForms submit button. The checkbox uses the name wpforms[wpsc_optin] so WPForms’ own form serializer includes it inside $_POST['wpforms'], making the value available as $entry['wpsc_optin'] at submission time — no separate POST key lookup needed.
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. WPForms identifies fields by their integer field ID. Simple fields use the numeric ID directly (e.g. 3). Name fields that split into first, middle, and last use a compound key format — {id}:first and {id}:last — which appear as separate entries in the dropdown. The dropdown is populated automatically from the 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 WPForms 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 wpforms_process_complete, which fires after every successful WPForms submission and entry save. The $fields array passed by this hook is keyed by integer field ID and includes both the formatted value and sub-field values for compound fields like Name. Only validated, successfully saved submissions trigger consent capture — failed validations and spam-blocked submissions never reach this hook.
Troubleshooting#
WP Smart Consent panel not visible in the builder — confirm the WPForms integration is enabled in the WPSC dashboard. The panel button is added via wpforms_builder_panel_buttons and the panel body via wpforms_builder_panels. If the builder does not show the button, try refreshing the page after enabling the integration.
Checkbox not appearing on the form — confirm the form is enabled in its WP Smart Consent panel. The checkbox is injected via wpforms_display_submit_before. If another plugin or WPForms add-on hooks the same action at a lower priority and replaces the submit area, the checkbox may not appear.
Name field showing blank — WPForms name fields split into sub-fields with compound IDs. Ensure the dropdown selection uses {id}:first for first name and {id}:last for last name rather than the parent field ID, which returns a combined string that may not parse correctly.