li-enum

History
VersionChange
release-2025-05Table dashboard support was added in the 2025-05 release.

Supported Features

Document
Media
Include
Document Creation Flow
Push Message
Usage Log
Table Dashboard
Display Filter
Search Indexing
System Metadata
Planning System
Webhook Conditions

Description

A li-enum metadata field shows a select form based on a statically defined list. On publish the selected value gets validated against the defined static list. With that you can assure that only specific values gets published.

Default UI

Select input

A required select field labelled foo label, its dropdown open on the options Tag A, Tag B and Tag C

Storage Format

<String>

Content Type Config

{
  handle: 'myContentType',
  // ...
  metadata: [
    {
      handle: 'myHandle'
      type: 'li-enum',
      config: {
        // common
        hideFromForm: false,                     // optional, default: false
        required: true,                          // optional, default: false
        requiredErrorMessage: 'Provide a value', // optional
        index: true,                              // optional, default: false
        // specific
        dataProvider: {                          // required
          type: 'labelValuePair',                // required
          items: [
            {label: 'Tag A', value: 'a'},
            {label: 'Tag B', value: 'b', isDefault: true}, // isDefault sets the value if document opened the first time
            {label: 'Tag C', value: 'c'}
          ]
        }
      },
      ui: {
        label: 'foo',                   // optional, takes camelized name otherwise
        config: {
          readOnly: true,               // optional, default: false
          placeholder: 'foo'           // optional, takes camelized name otherwise
        }
      }
    }
    // ...
  ]
}