Skip to main content

How to Embed a MailerLite Form to a Page, Post or Product

Hannah Harris avatar
Written by Hannah Harris
Updated this week

Embedding a MailerLite form onto your MemberVault page requires adding specific HTML and JavaScript code into particular sections of your page settings. This guide provides step-by-step instructions to ensure your form displays correctly in live and preview views.

  1. Obtain the Embed Code from MailerLite:

    • Log into your MailerLite account and navigate to "Forms" > "Embedded Forms."

    • Locate the "Embed form into your website" section and copy the JavaScript snippet code. This may appear as an HTML <div> element like <div class="ml-embedded" data-form="[FORM_ID]"></div>.

  2. Add the HTML Embed Code to MemberVault:

    • Open the page, product, or post you would like to edit in your MV admin dashboard.

    • Click the source code button and insert the HTML <div> code snippet into the text editor.

  3. Add the Associated JavaScript to MemberVault:

    • Navigate to the Advanced > Custom JavaScript section in the page settings of your MemberVault editor.

    • Paste the script tag code copied from MailerLite into this section. This ensures the form is functional.

  4. Save and Preview:

    • Save your changes to the page.

    • Click Preview or view the live page to verify the form renders correctly. Note: The form will not display in the MemberVault page editor but should be visible in preview or live views.

Frequently Asked Questions (FAQs)

Why doesn’t the form appear in the MemberVault editor?

The MemberVault editor doesn’t render custom embedded forms. However, the form should populate correctly in the preview or live version. Ensure all required codes are correctly entered.

Can I use the "JavaScript snippet" provided by MailerLite directly?

Yes! MailerLite offers both HTML and JavaScript snippets. The <div> HTML element is added to the text editor’s Source Code block, while the script code must be placed in the Custom JavaScript settings for proper functionality.


Related Articles:


Questions? Reach out to us at hello@membervault.co, within our Facebook group, The MV Collaborative, or via chat support within your admin account (not sure how to log in? look up your account here).

Did this answer your question?