Forms

Share a HubSpot form on an external site

Last updated: November 26, 2019

Forms can be shared in two ways on your external, non-HubSpot-hosted site.

With either method, any change made to the form in HubSpot's forms tool will be automatically reflected on the live form on your external site

Learn how to add HubSpot forms to WordPress pages or posts.

Add the form embed code

Please note: if you associate a Salesforce campaign with your form, the form's embed code will be changed. In this case, you must re-add the embed code to your external site.

  • In your HubSpot account, navigate to Marketing > Lead Capture > Forms.
  • Click the name of your form.
  • Click the Options tab to choose what will happen after a visitor submits your form. You can choose to redirect your visitors to a thank you page or display an inline thank you message when a visitor submits your form.
  • In the upper right, click Share.
  • In the dialog box, if you want to add contacts who submit the form to a Salesforce campaign, click the Add contacts to a Salesforce campaign dropdown menu and select a campaign.
  • Click Copy.
    forms-editor-share-form-copy-form-embed
  • In the top right, click Publish
  • Paste the embed code into the desired location of the HTML on your external page. To track your form, your HubSpot tracking code must be installed on the external page where you place a HubSpot form.

Learn how to style your embedded form.

If you are working with WordPress, learn how to insert a form on your WordPress post or page.

Create a standalone form page 

You can share your form via a form page so it will exist on its own page at its own URL.  

  • In your HubSpot account, navigate to Marketing > Lead Capture > Forms
  • Click the name of your form. 
  • In the upper right, click Share
  • In the dialog box, click the Share link tab. 
  • Click Copy to copy the form page's URL to your clipboard, then click Close.

share-form-own-page

  • In the top right, click Publish.
  • In your browser, open a new window or tab and paste your form page's URL in the address bar to load it. You can also share the form page URL directly with others to give them access to the form.
If you are embedding a form on your WordPress site, you may need to apply additional CSS declarations within your external stylesheet to make the form responsive. 

If you notice your form not working in WordPress or the embed code being altered when you view the live page, you may need to insert the form using a plugin to make sure the embed code stays intact. If you're using the latest version of Gutenberg, which removes inline JavaScript, use the Inline JS Block for Gutenberg plugin to embed forms and CTAs onto your page.

/forms/how-can-i-share-a-hubspot-form-if-im-using-an-external-site