Skip to content

password

password fields are identical to string fields except that the user's input is visually obscured, they do not support the textarea option, and they are not indexed for search.

Module field definition

javascript
// Configuring the `secret` field in a module's `fields.add` subsection:
secret: {
  label: 'Your secret code',
  type: 'password'
}

Settings

Required

PropertyTypeDefaultDescription
labelStringn/aSets the visible label for the field in the UI
typeStringn/aSpecifies the field type (password for this type)

Optional

PropertyTypeDefaultDescription
defStringn/aThe default value for the field
helpStringn/aHelp text for the content editor
htmlHelpStringn/aHelp text with support for HTML markup
minIntegern/aSets the minimum number of characters allowed
maxIntegern/aSets the maximum number of characters allowed
requiredBooleanfalseIf true, the field is mandatory
readOnlyBooleanfalseIf true, prevents the user from editing the field value

Use in templates

You probably do not want to print values from this field in templates, but they can be printed the same way as string fields.