1. Arrow Left Icon Plugins
Mailerlite Plugin Icon

Mailerlite Plugin

Add new subscribers to Mailerlite from form results.

Use the Mailerlite Plugin to create and update Mailerlite subscribers from new form results.

Add new subscribers to your subscriber list and optionally slot them into single or multiple groups, complete with options for conditional opt-in or always opt-in.

Setup the Plugin

Go to the Plugins page in your form, select Mailerlite and you’ll see an input box to enter your Mailerlite API Key:

Viewing the Mailerlite Plugin inside Fun Forms

To get a Mailerlite API Key, visit your Mailerlite Account and follow the steps below.

Note: If you’re using the “Classic” version of Mailerlite, you’ll get your API key this way instead.

Once logged in, visit the Integrations tab:

Clicking 'Integrations' inside Mailerlite

Then, go to the API section and click Use:

Clicking 'Use' inside Mailerlite on the 'API' option

Click Generate new token:

Clicking 'Generate New Token' inside Mailerlite's API configurator'

Enter a token name, for example Fun Forms Plugin and click Create token:

Clicking 'Create Token' inside Mailerlite's API configurator with the token name 'Fun Forms Plugin''

Then, copy the generated token:

Copying the generated Mailerlite Token inside Mailerlite's API configurator

Go back to the Mailerlite Plugin inside Fun Forms, paste your token into the input box and click Connect:

Pasting the Mailerlite Token inside the Mailerlite Plugin

Once setup your Mailerlite account name is displayed in the plugin configuration.

Create Subscribers with Mailerlite

To create new Mailerlite subscribers from form results, use the Field Mapper within the Mailerlite Plugin to connect form fields to Mailerlite field tag names.

Subscribe with Email

First create a form and add an Email Field:

An example form we've connected the Mailerlite Plugin to with an email field

Create the connection to the Email Field with a Mailerlite field tag name “email” with the Field Mapper:

Using the Field Mapper to connect the email form field to Mailerlite's 'email' field tag name Field type ‘Email’ • Field Mapped to ’email’

Click Save and Publish, then enter some data in your form and click Send:

Entering an example email in our form's Email Field

A Mailerlite subscriber is then created from the email entered value when the form is submitted:

Viewing the newly created Mailerlite subscriber inside the Mailerlite app

That’s it! To include extra fields, groups and opt-in checkboxes - read on.

Subscribe with Extra Fields

Mailerlite uses “field tags” to reference different attributes of a subscriber, such as their First Name, Email or Phone.

See the full list of available Mailerlite field tags (including custom ones), or go to to the Subscribers tab in the Mailerlite app, then click Fields:

Clicking 'Fields' inside Mailerlite's 'Subscribers' page

Always use the Tag column value, e.g. name and last_name

Here is the full list of Mailerlite field names for you to copy, you can pick and choose which to use for your form:

  • email - Subscriber email (always required)
  • z_i_p - Subscriber ZIP/postal Code
  • state - Subscriber state location
  • phone - Subscriber phone number
  • name - Subscriber first name
  • last_name - Subscriber last name
  • country - Subscriber country location
  • company - Subscriber company name
  • city - Subscriber city location

🔗 Mailerlite’s Custom Fields Guide is a great resource for optional further reading.

Let’s add First Name and Company fields to our form and then map them to name and company:

Adding First Name and Company fields to our example form connected to the Mailerlite plugin

Create the connection to each field with a Mailerlite Field Tag with the Field Mapper:

Using the Field Mapper to connect form fields to Mailerlite field tag names

Click Save and Publish, then enter some data in your form and click Send:

Entering example data in our form for First Name, Company and Email

Then view the new subscriber inside Mailerlite with the extra Name and Company field data:

Viewing the Mailerlite extra field metadata for our new subscriber that includes the Company and First Name of the subscriber

Adding to Group(s)

Automatically add new Mailerlite subscribers to one or more groups, based on the answers supplied in their form result.

Click Subscribers again, then select Groups and Create group:

Clicking and viewing the 'Groups' page inside Mailerlite and clicking 'Create group'

Enter a group name, such as Technology, and click Create:

Creating a new group called 'Technology' inside Mailerlite

Repeat the process and create more groups, such as Arts and Science:

Viewing all of the new group names in Mailerlite called 'Arts', 'Science' and 'Technology'

Single Groups: To allow the user of your form to be added to a single group you’ll want to use a Single-Select Field or Dropdown Field.

Multiple Groups: To allow the user to select multiple groups at once you’ll want to use the Multi-Select Field.

After adding either a Single-Select, Multi-Select or Dropdown Field to your form, click Edit and in the Options list add each Mailerlite group name:

Adding the new Mailerlite group names in the Fun Forms options field list

Create the connection to Mailerlite that the options are group names, use the Field Mapper and add a group_ value:

Configuring the Field Mapper to instruct Mailerlite that our Multi-Select Field contains group names via a 'group_interests' value

group_interests has no special meaning beyond telling the Mailerlite Plugin that this field contains groups. Use any suffix to group_ such as group_hobbies.

Click Save and Publish, then enter some data in your form and click Send:

Entering an example email and selecting 'Science' and 'Technology' from the Multi-Select Field options in our form

We can then see the Science and Technology groups now contain a new subscriber:

Viewing the Mailerlite subscriber added to both groups 'Science' and 'Technology'

Locating and clicking on the new subscriber also displays the group(s) they belong to:

Viewing the new Mailerlite subscriber status displaying their groups of 'Science' and 'Technology'

What’s more is you can repeat the process by adding another field, more groups, and configuring them in the Field Mapper to add subscribers to multiple groups across multiple form fields.

Auto-Add to a Single Group

To automatically add new subscribers to a single group without their input, opt for the Hidden Field:

Adding Fun Forms's Hidden Field to an example form linked to Mailerlite Viewing the form inside the Editor

Once added, click Edit and you’ll see Name and Value. Enter any unique name into the Name field, followed by the group name inside the Value field:

Entering a unique group key and value inside Fun Forms's Hidden Field

Create the connection to Mailerlite that the Hidden Field contains a group name, use the Field Mapper and add a group_ value with a unique suffix, e.g. group_arts:

Configuring the Field Mapper to instruct Mailerlite that our Hidden Field contains a group name via a mapping value of 'group_arts'

Click Save and Publish, and you’ll notice the Hidden Field is not visible to the user. Then, enter some data in your form and click Send:

Entering an example email into our form that contains a Hidden Field configured to automatically add new subscribers to the 'Arts' group upon submission Viewing the published form the user will see

We can then see the Arts group now contains a new subscriber:

Viewing the Mailerlite groups list with a new subscriber count visible in the 'Arts' group

Locating and clicking on the new subscriber also displays the group they belong to:

Viewing the new Mailerlite subscriber status displaying their group of 'Arts'

Opt-In Permission

To maintain compliance with data processing laws like GDPR, CCPA, PIPEDA and DPA it may be appropriate to use our Opt-In feature to allow conditional subscribing. Users will consent to being added to your marketing list while filling out your form and are added as a subscriber if they agree.

If they don’t agree, your form result is still processed but they are not added to Mailerlite.

Our recommended field to use for this is the Yes/No Field, where the user can select a simple Yes or No choice to agree to be signed up:

Adding the Yes/No Field to our form which will be configured as the Opt-In trigger to conditionally add new Mailerlite subscribers Field type ‘Yes/No’ • Field Mapped to ‘opt_in’

Important: The value “Yes” needs to remain for this to work, so don’t rename the label within this field. This is due to us understanding the context as labels can be misleadingly named.

Create the connection to Mailerlite that the Yes/No Field is treated as the Opt-In, use the Field Mapper and add opt_in:

Adding the value 'opt_in' to our Yes/No field inside the Mailerlite Plugin's Field Mapper

If the user selects Yes they are added to Mailerlite. If they select No you still receive a form result, but no Mailerlite subscriber.

Alternatively, use the Consent Field as the Opt-In trigger, which is useful for giving data processing consent and email marketing opt-in notice:

Demonstrating the Consent Field with a short paragraph of text explaining the marketing permissions and opt-in Field type ‘Consent’ • Field Mapped to ‘opt_in’

The Multi-Select Field may also be used if desired, which would allow you to set the field as optional (as the Consent Field is Required at all times), however must only include one option:

Demonstrating the Multi-Select Field with a single option of 'Yes please!' to conditionally allow users to opt-in Field type ‘Multi-Select’ • Field Mapped to ‘opt_in’

Explainer: Only one option is allowed when using the Multi-Select Field due to the flexibility of the field and associating a selected item with what you intend to be a ‘Yes’ vote to opting a user in.

That’s it! You can contact us for help anytime.