Skip to content

Toggles

A toggle is a switch. While it’s off, it removes chosen elements from the email and hides chosen fields from the form. Use toggles for anything optional: a button, a heading, a subtitle, a badge, a second paragraph.

Mark the element to remove. Here it’s the whole row the button sits in, so its padding goes too:

<tr data-mm="button-row">
<td style="padding:8px 32px 32px">
<a data-mm="button" href="https://example.com">Get started</a>
</td>
</tr>

Then add a toggle:

SettingValue
LabelShow button
On by defaultOn
Removes from the emailbutton-row
Hides in the formButton (the link field for button)

When a marketer turns Show button off, the row disappears from the preview and the export, and the Button field disappears from the form.

SettingWhat it does
On by defaultWhether new modules start with the toggle on.
Removes from the emailMarked elements that are taken out, with everything inside them, while the toggle is off.
Hides in the formFields or groups that are hidden while the toggle is off.

A toggle that neither removes nor hides anything shows a warning.

  • Removed means removed. The marked element and its contents are left out of the HTML entirely, so they can’t show up in any email client.
  • Hidden fields keep their values. Turn a toggle off and on again and the content comes back.
  • Hidden fields aren’t checked. A required field that’s hidden doesn’t need filling in.
  • Toggles work inside repeaters. A toggle in a repeater item removes and hides things in that item only, such as a “Show badge” switch on each product card.

When the workspace has a Shopify store or WordPress site connected, a toggle can be set from a product or post. For example, a “Show sale badge” toggle can switch on automatically for products that are on sale. See Mapping fields to products and posts.