How to iframe a HubSpot form into an external site

I) Get the code for the form:

  1. Settings > Form Manager
  2. Find the name of the form, then "Edit" on the right
  3. "Get Form HTML" top right
  4. Add the target attribute to the form tag on the first line:
    <form target="_blank"
  5. Select all and copy the code

II) Create an HTML page to host the form code:

  1. Settings > File Manager
  2. Click on the folder that you want to add a page to (e.g. "forms" or create a new folder for it)
  3. Choose "New File"
  4. Name it something related to the form, followed by .html (e.g. "myform.html")
  5. The URL will now be your file manager path name, plus the folder, plus the file name (e.g. http://subdomain.domain_name.tld/Portals/#####/forms/myform.html")
  6. Paste the code from Section I into this new file
  7. Save & Close

III) Use iframe to insert the form into your external site:

  1. The code should look like:
    <iframe src="http://subdomain.domain-name.tld/Portals/#####/forms/myform.html" frameborder="0" width="100%" height="800px"><p>Your browser does not support iframes</p></iframe>
  2. The src="" should be the path of the HTML file from Section II Step 5
  3. The height="800px" should be adjusted to fit the form (by using developer tools or trial and error until it fits)
  4. Paste the resulting iframe code into your external page, and then save and upload it to your server.