Skip to content

Troubleshoot externally embedded HubSpot forms

Last updated: June 28, 2023

Available with any of the following subscriptions, except where noted:

All products and plans

If the HubSpot form you've embedded on an external page isn't working or appearing correctly, learn about the most common form embed issues and how to troubleshoot them.

Confirm the form embed code

To confirm that the embed code on your external page is correct, compare the form embed code provided by HubSpot with the code that’s on your site:
  • In your HubSpot account, navigate to Marketing > Lead Capture > Forms.
  • Hover over the form and click Edit.
  • In the upper right of the form editor, click Embed.
  • In the dialog box, click Copy.

  • In your browser, navigate to Diff Checker, a text comparison tool. 
  • In the Original Text section, paste the form embed code.
  • Navigate to the website page where the form is embedded. Then, right-click anywhere on the page and select View page source
  • Locate the form embed code in the page source and copy it.
  • Navigate back to Diff checker.
  • In the Changed Text section, paste the externally embedded code.
  • Click Find Difference to look for missing or broken code. If the embed codes are the same, the message The two files are identical will display. Otherwise, any differences will be highlighted in red and green.

If the externally embedded code does not match the HubSpot code, re-embed the correct code on your external page.

If the externally embedded code does match the HubSpot code, something in the HTML or JavaScript on your external page may be interfering with the form's embed code. You should work with your developer to troubleshoot further.

Host-specific embed issues

If you're using WordPress, Squarespace, or Wix, you can continue troubleshooting for the following issues in each of the website hosts below. 

WordPress

If your form is embedded on a WordPress page, you might encounter the following issues:

  • WordPress may convert '&' in the embedded form code to '&' which will break the functionality of the code.
  • XHTML WordPress themes will add <![CDATA[ ]]> tags around the JavaScript, which should not affect form rendering but is something to take note of when checking the form embed code.

If WordPress is altering the embed code, it's recommended to use a third-party plugin such as Insert HTML Snippet to add the form to the page or post as a shortcode to preserve the script tags.

Squarespace

Some Squarespace templates render scripts only on the initial page load and not on any other pages. This can result in HubSpot forms not working correctly on some pages because the form scripts do not get loaded as the visitor navigates your website. 

To prevent this from occurring, try disabling Ajax loading in Squarespace. If this does not work, you can also try using a different Squarespace template.

Wix

Wix generally does not support custom coding on hosted websites. As a result, it is not possible to embed your HubSpot form directly into a Wix page.

To add a HubSpot form to your Wix page, try adding a Wix iframe module first, then adding the form to the module either as a Widget by entering the form's embed code or an embedded Site by entering the URL of the form's standalone page. 

Browser-specific issues

If you have a resource-blocking browser extension like Ghostery, your HubSpot forms can be blocked from loading and displaying. Learn more about what happens when your HubSpot forms are blocked

Was this article helpful?
This form is used for documentation feedback only. Learn how to get help with HubSpot.