initHubspotForm triggers on all HubSpot forms, not just the specified form ID
We're using Calendly routing forms with HubSpot form embedding on our website. We followed the docs to set up routing from a HubSpot form using the provided embed code:
<script src="https://assets.calendly.com/assets/external/forms.js" async></script> <script>
window.addEventListener('load', function() {
Calendly.initHubspotForm({
"id": "our-hubspot-form-id",
"url": "https://calendly.com/api/form_builder/forms/our-form-id/submissions"
})
})
</script>
The problem: even though we pass a specific HubSpot form ID in the id parameter, initHubspotForm intercepts submissions from every HubSpot form on the page. We have multiple HubSpot forms across our site (gated content, tools, calculators), and submitting any of them triggers the Calendly routing popup.
We expected the id parameter to scope the integration to only that form. Is this a known limitation? Is there a way to restrict initHubspotForm to a single form?
Our current workaround is using widget.js with Calendly.initPopupWidget instead, triggered manually in our own form submission handler where we check the form ID ourselves. This works, but it bypasses the routing form integration entirely and requires us to hardcode the scheduling page URL rather than using the routing form's API endpoint.
Has anyone found a better solution?


