Skip to main content

HubSpot Forms

HubSpot Forms helps you run secure, server-side HubSpot form submissions from WordPress using native markup (no iframe embeds).

What It Does

  • Creates a HubSpot Form content type in WordPress
  • Syncs fields from HubSpot forms into the editor
  • Renders forms via shortcode on any post/page
  • Submits form payloads to HubSpot server-side
  • Supports reCAPTCHA v3 and consent controls

Initial Setup

  1. Install and activate BB HubSpot Forms.
  2. Go to Settings -> BB HubSpot Forms.
  3. Enter:
    • HubSpot Portal ID
    • Private App Access Token
  4. Click Test HubSpot Connection.

Add an encryption key in wp-config.php so stored credentials are encrypted at rest:

define( 'BB_HUBSPOT_ENCRYPTION_KEY', 'put-a-long-random-string-here' );

Creating and Embedding a Form

  1. Go to HubSpot Forms -> Add New HubSpot Form.
  2. Select a HubSpot form from the dropdown.
  3. Click Sync fields from HubSpot.
  4. Optionally reorder, relabel, or hide fields.
  5. Copy the generated shortcode and embed it on your page:
    • [bb_hubspot_form id="123"]

Key Settings

  • Connection: Portal ID, token, connection test
  • CAPTCHA: Provider, score threshold, expected action
  • Consent: Required processing consent + optional marketing opt-in
  • Appearance: Toggle default styles if you want full theme control
  • Debug: Admin-only diagnostic logging

Troubleshooting

Form not loading

  • Confirm the form post has a synced schema.
  • Re-sync fields from HubSpot in the editor.

Submission fails

  • Re-test HubSpot connection.
  • Confirm Private App token and required scopes.
  • Check CAPTCHA settings (provider, key pair, expected action, score).

Token issues

  • Verify BB_HUBSPOT_ENCRYPTION_KEY exists and is stable across environments.