Skip to content

email ​

email fields operate similarly to a normal string field, but will only accept a valid email address.

Module field definition ​

javascript
// Configuring the `workEmail` field in a module's `fields.add` subsection:
workEmail: {
  label: 'Work email address',
  type: 'email'
}

Settings ​

Required ​

PropertyTypeDefaultDescription
labelStringSets the visible label for the field in the UI
typeStringSpecifies the field type (email for this type)

Optional ​

PropertyTypeDefaultDescription
directionStringn/aSets the text direction for the field. Use 'ltr' for left-to-right or 'rtl' for right-to-left. Overrides the locale's default direction. See the RTL language support guide for details.
helpStringn/aHelp text for the content editor
htmlHelpStringn/aHelp text with support for HTML markup
ifObject{}Conditions to meet before the field is active. See the guide for details.
requiredIfObject{}Conditions to meet before the field is required. See the guide for details.
requiredBooleanfalseIf true, the field is mandatory
readOnlyBooleanfalseIf true, prevents the user from editing the field value

Use in templates ​

jsx
Email: {piece.workEmail}