Forms

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

Last updated: April 21, 2017

Available For:

Marketing: Basic, Pro, Enterprise
Sales: N/A

If your externally embedded form is not working or is not collecting data, follow the steps below to verify the embed code on your WordPress page matches the code in HubSpot. 

  • Navigate to your form embed code in HubSpot (see this article for instructions on how to get your form's embed code).
  • 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 you are seeing that WordPress is altering the embed code, 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/.