A form may sometimes be dynamically rendered on a page and load in different locations. Sometimes on older browsers, the form may not even display.
To ensure the form loads successfully on a specific part of the page, you can add a target attribute to the form embed code to specify the specific container you want the form to render in.
For example, you can force the form to render in a container on the page with the CSS class of sidebar. To add a target attribute to the form embed code:
In the form embed code, add a comma (,) after the formId.
Then, enter a new line and enter target: '[container name]' .
When you embed the same HubSpot form multiple times on an external page, the forms may appear side by side or in the wrong location. This happens if the form embed codes are added to the same <div> tag in the page HTML.
To ensure the forms load and display correctly, add the formInstanceId attribute and specify a unique value for each form embed code:
In the form embed code, add a comma (,) after the formId attribute value,
Then, enter a new line and enter formInstanceId: '[number]'.
Add and number each form in the order it appears on the page. For example, '1' for the first form, '2' for the second form, and so on.
Thank you for your feedback, it means a lot to us.