Enginemailer allows you to embed your form on any page of your WordPress site. In this article, you'll learn how to add an embedded form to WordPress.
Before you start:
- If you haven't created a form yet, you can learn how to do so here.
- Take note that without SSL encryption, your form may not function properly on WordPress.
Get the embed <script> in Enginemailer
To get the form code, follow these steps:
- After you have created a form in form builder, navigate to the Publish step.
- Click I will embed the form into my website.
- Click Copy Script to copy the code.
In WordPress - To add a custom HTML block, click on the Block Inserter icon.
You can also type /html and hit enter in a new paragraph block to add one quickly.
Detailed instructions on adding blocks can be found here.
Editing the Block
To embed the script code, paste the <script> and <div id="optedInFormWrapper"></div> into the HTML.
By default, the size of the form will be 1200px (w) x 1000px (h). You can customise the size by changing the number of the width and height inside the script.
The form will be appended to the last part of the <body> section. If you want to change the position, simply add an empty <div> with the id of optedInFormWrapper and place it into your website's HTML where you want the form to appear.