Please note: if you add a Salesforce campaign to your form, the form's embed code will be changed. In this case, you do need to re-add the code to your external site.
- Navigate to your forms:
- In your HubSpot Marketing Basic, Professional, or Enterprise account, navigate to Contacts > Forms.
- In your HubSpot CRM or Marketing Hub Starter account, navigate to Lead Capture > Forms.
- Click the name of the form you want to embed on your site.
- Click the Options tab to customize 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 top right corner click Actions and select Embed code.
- Copy the embed code to your clipboard.
- Click Save and Publish in the top-right corner of the screen.
- Paste the embed code into the desired location of the HTML on your external page. Make sure you've also included your HubSpot tracking code on any external page where you place a HubSpot form. The tracking code will ensure all data submitted on your form gets captured properly.
Please see this article for information on how to style and customize embedded forms.