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 to copy the codes.
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.
The form code does not specify fixed height and width values, as such it will automatically adapt to different screen sizes. If you need to customise its responsiveness further, you can make the necessary adjustments on your WordPress website.
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.