Hubspot Form Block
A lightweight Hubspot form embed block
by Human Made Limited · github.com/humanmade/hubspot-form-block · website
★ 2stars
7.3kcomposer installs
3forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/humanmade/hubspot-form-block/archive/refs/heads/main.zipAlso on Packagist as humanmade/hubspot-form-block:
composer require humanmade/hubspot-form-blockFrom the readme
HubSpot Form Block
A WordPress block plugin that embeds HubSpot Forms v4 directly in page content. Forms render inline (not iframed) — HubSpot injects DOM into the container element.
Features
- HubSpot Forms v4 API — uses the modern developer embed API
- Inline success message — add any WordPress blocks as the post-submission message; shown in place of the form after submission
- Gated content — optionally remember submissions in the browser (per page URL) and show the success content immediately on return visits, hiding the form permanently; supports a "First Submission Message" block for content only shown at the moment of first submission
- Global settings — set Portal ID and region site-wide; override per block instance
- Google Tag Manager — fires a configurable dataLayer event on submission (default: hubspotformsubmit)
- Deferred script loading — HubSpot tracking JS loaded asynchronously in the footer
- Custom submit button text — override the form's submit button label per block instance
- Redirect on submit — optionally redirect to a URL instead of showing an inline message
- Multiple instances — multiple instances of the same form on a single page are fully supported
B
Read the full README on GitHub →