Forms

Why is my embedded form not working on my WordPress page?

Last updated: December 13, 2016

Available For:

Product: HubSpot Marketing
Subscription: Basic, Professional, & Enterprise

If your externally embedded form is not working or is not collecting data, follow the steps below to verify the form embed code.

  • Bring up your form embed code in HubSpot (see this article for instructions on how to do that.)
  • Navigate to the page on Wordpress where your Hubspot form is (use a new window and place it next to the window with your form embed code open so you can see both at once)
  • Right-click anywhere on the page > choose View page source
  • Locate the form embed code on the page by hitting Ctrl+F (or Cmd+F on a Mac) on your keyword and searching for your HubSpot ID (please note: the HubSpot analytics tracking code also contains your HubSpot ID, so look for formID as well to avoid confusion)
  • Compare the embed code on the page to the embed code in the form editor; the snippets should match
  • 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 whether the form renders.

If re-embedding the form does not resolve the issue, you may need to use a third-party plugin to add the form to the page/post in the form of a shortcode. One plugin that allows users to insert CTA codes via a shortcode (therefore preserving the script tags) is Insert HTML Snippet which can be downloaded here: https://wordpress.org/plugins/insert-html-snippet/. Wrapping your form embed code in <div> tags may also prevent Wordpress from adjusting the code.