In this article, we’ll show you how to embed a form to your site using form code. The instructions illustrated below use an inline form, however, this document can be used for any form type.
When you create a form, we’ll automatically generate different integration options you can use to collect subscribers. One of those options is an embed code(s).
To locate the form embed code:
- Navigate to the Forms page and click “Edit” for the form you wish to post.
- Click the “Integrate” button located on the top right of your screen.
- On the “Integrate Your Form” page, we’ll provide you with both the Simple Embed code and the Full Embed code.
The simple embed code uses Javascript. Any changes you make to your form in the T2Connect application will be reflected on your website right away. This code is available for all form types.
The full embed code uses both CSS and HTML. This can be thought of as a static form—any changes you make to your form in the T2Connect application will not be reflected on your form. You will need to re-paste your form code in order to see those changes or make changes directly into your pasted form code. This form code type is available for inline forms only. - Hover your mouse over either option and copy the code.
- Paste the form code into your website’s HTML where you want the form to appear.
Note: If you are using a website builder, please refer to that platform’s specific instructions on adding form code to their site.
There are benefits to each embed option. If you use the JavaScript, then any edits you make to the form in T2Connect are automatically reflected in the form you place on your web asset. In a sense, the JavaScript functions like a mirror.
That is not the case with the full embed. Any edits you make to a form in our form editor are NOT automatically reflected in a form that you integrated via full embed. For changes to be reflected, you have to make edits directly in the full embed code. Typically, the full embed option is reserved for developers who want to have complete control over the form’s creation. Indeed, the full embed option existed before we added the style tab to our form editor, which makes customization easy even for those who don’t code.
With that said, the JavaScript route is our preferred form integration option. But alternatives exist, and another option might be better suited for you and your business.