Skip to content

Field type reference

This article lists every field type you can add to a component. To add a field, see Fields.

Field typeShows in the email editorUse it for
TextA single-line text boxHeadlines, button text, alt text
Rich textA rich text editorBody copy with bold, italics, links and lists
NumberA number boxWidths, sizes, counts
BooleanAn on/off toggleShowing or hiding part of a component
EnumA dropdown of fixed optionsChoosing from a set list, such as a style
URLA link boxLink destinations
ImageAn image pickerImage sources
ColorA color pickerBackground and text colors
Horizontal alignLeft, center and right buttonsHorizontal alignment
Vertical alignTop, middle and bottom buttonsVertical alignment
CodeA code editorRaw HTML or ESP code

Every field type has a Label, Liquid variable, Group, Hint and Visible if setting. See Fields for what they do. Each section below covers what’s specific to the type. In the examples, the table shows the field the template uses.

A single line of plain text.

A text field in the email editor

  • Value: the text entered.
  • Validation rules: Minimum length, Maximum length, Must not be blank, Must not be default.
LabelLiquid variableType
CTA textcta_textText
<a href="https://example.com">{{cta_text}}</a>

Formatted text and links.

A rich text field in the email editor

  • Value: the formatted text, as HTML.
  • Options: which formatting people can use, and any custom styles. See Rich text formatting and custom styles.
  • Validation rules: Minimum content length and Maximum content length (counting the text only, not the formatting), Must not be blank, Must not be default.
  • Link tracking: if a link tracking profile is set up, tracking is added to links in the field.
LabelLiquid variableType
Body textbody_textRich text
<td>
{{body_text}}
</td>

A number.

A number field in the email editor

  • Value: the number entered. The default value must be a whole number or a decimal.
  • Validation rules: Minimum, Maximum.
LabelLiquid variableType
Image widthimg_widthNumber
<img src="https://example.com/example.png" width="{{img_width}}" style="display: block; width: {{img_width}}px;" />

An on/off toggle.

A boolean field in the email editor

  • Value: true or false. Usually used with an if tag.
  • Validation rules: none.
LabelLiquid variableType
Show imageshow_imageBoolean
{% if show_image %}
<img src="https://example.com/example.png" />
{% endif %}

A dropdown with a fixed list of options.

An enum field in the email editor

  • Value: the Value of the chosen option.
  • Options: for each option, the Label people see and the Value your template receives. Click Add option to add more, or Edit as JSON to edit them all at once. The default value must be one of the options.
  • Validation rules: none.
LabelLiquid variableTypeOptions
Text alignmenttext_alignmentEnumleft, center, right
<td style="text-align: {{text_alignment}}">
<p>Some content</p>
</td>

A link destination, with a button in the email editor to open the link.

A URL field in the email editor

  • Value: the URL entered, with tracking parameters added if link tracking applies.
  • Options: Skip link tracking turns off link tracking for the field.
  • Validation rules: Must not be blank, Must not be default.
  • Link tracking: if a link tracking profile is set up, people are asked for the link’s tracking parameters.
LabelLiquid variableType
CTA URLcta_urlURL
<a href="{{cta_url}}">Shop now</a>

An image. People can choose an image from the image library, upload one, or enter a URL.

An image field in the email editor

  • Value: the image’s URL. Usually used as the src of an <img> tag.
  • Validation rules: Must not be blank, Must not be default.
LabelLiquid variableType
Imageimg_urlImage
<img src="{{img_url}}" />

A color picker.

A color field in the email editor

  • Value: a hex color, such as #1F6F5C. The default value must be a hex color too.
  • Validation rules: none.
LabelLiquid variableType
Background colorbg_colorColor
<td style="background-color: {{bg_color}}">
<p>Some content</p>
</td>

Buttons for left, center and right alignment.

A horizontal align field in the email editor

  • Value: left, center or right.
  • Options: which alignments people can choose. The default value must be one of them.
  • Validation rules: none.
LabelLiquid variableType
Logo alignmentlogo_alignmentHorizontal align
<td align="{{logo_alignment}}">
<img src="https://example.com/logo.png" alt="Logo" />
</td>

Buttons for top, middle and bottom alignment.

A vertical align field in the email editor

  • Value: top, middle or bottom.
  • Options: which alignments people can choose. The default value must be one of them.
  • Validation rules: none.
LabelLiquid variableType
Content alignmentcontent_alignmentVertical align
<td valign="{{content_alignment}}">
<p>Some content</p>
</td>

A code editor, for people who need to add raw HTML or ESP code to an email.

A code field in the email editor

  • Value: the code entered, output as it is.
  • Validation rules: Must not be blank, Must not be default.
LabelLiquid variableType
Code blockcode_blockCode
<td>
{{code_block}}
</td>