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.
Example: an optional button
Section titled “Example: an optional button”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:
| Setting | Value |
|---|---|
| Label | Show button |
| On by default | On |
| Removes from the email | button-row |
| Hides in the form | Button (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.
Settings
Section titled “Settings”| Setting | What it does |
|---|---|
| On by default | Whether new modules start with the toggle on. |
| Removes from the email | Marked elements that are taken out, with everything inside them, while the toggle is off. |
| Hides in the form | Fields or groups that are hidden while the toggle is off. |
A toggle that neither removes nor hides anything shows a warning.
How toggles behave
Section titled “How toggles behave”- 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.
Toggles and integrations
Section titled “Toggles and integrations”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.