Docs

HappyForms Integration

3 min readUpdated June 21, 2026

HappyForms is a WordPress form builder that uses the WordPress Customizer as its form editor. WP Smart Consent integrates with HappyForms to add an opt-in checkbox to any form, with per-form configuration accessed from the HappyForms form list.

Enabling the Integration#

In the WP Smart Consent dashboard, go to Form Sources and toggle HappyForms on. Per-form behavior is then configured individually from the HappyForms form list.

Screenshot of the HappyForms plugin settings page. The “Enable HappyForms” toggle is off. Tabs for “General” and “Collect fields” appear. A green “Save HappyForms” button is at the bottom, with setup and configuration instructions above it.

Per-Form Settings#

HappyForms builds forms inside the WordPress Customizer rather than a standard post editor, so WP Smart Consent cannot add a meta box to the edit screen. Instead, settings are accessed via a WP Smart Consent link in the row actions on the form list. Go to HappyForms → Forms, hover over any form, and click WP Smart Consent in the row actions below the form name. This opens a dedicated settings page for that form.

Form Type#

Contact form — WP Smart Consent injects the consent checkbox via happyforms_form_submit_before, which fires inside HappyForms’ form submit template immediately before the submit button element. HappyForms processes submissions via WordPress AJAX, so $_POST is fully populated throughout. 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. HappyForms identifies each field by its integer part ID. The dropdown in the settings page is populated automatically from the form’s registered parts. Field values at submission time are keyed by that integer ID in the $submission array, so lookups are direct with no additional parsing.

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 HappyForms 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 happyforms_submission_success, which fires after every valid, non-spam HappyForms submission. Failed validations and spam-filtered submissions never trigger this hook, so consent is only captured on genuine successful submissions.

Troubleshooting#

WP Smart Consent row action not appearing — confirm the HappyForms integration is enabled in the WPSC dashboard and that the HappyForms form list is at HappyForms → Forms. The row action is registered on the happyform post type list.

Checkbox not appearing on the form — confirm the form is enabled in its WP Smart Consent settings. The checkbox is injected via happyforms_form_submit_before. If a custom HappyForms theme template overrides the submit area without calling this hook, the checkbox will not appear.

Wrong field values forwarded — HappyForms field IDs are integers assigned at field creation time. If a field was deleted and re-added in the Customizer, its ID changes. Re-open the WP Smart Consent settings for that form and re-select the correct fields.

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only