Skip to content

Dictionary fieldtype: single-select shows the raw id instead of the label #14835

Description

@helloiamlukas

Bug description

A single-select dictionary field (max_items: 1) with a dictionary which options() does not return the whole dataset (i.e. an API-backed dictionary) renders the stored id instead of the label when an existing entry is opened. The label only appears after the value is re-selected. A multi-select field using the same dictionary renders the label correctly on load.

Image

How to reproduce

  1. Clone repository: https://github.com/helloiamlukas/no-label-for-dictionary-fields
  2. Open /cp/collections/things/entries/a1b2c3d4-0000-4000-8000-000000000001 in browser

Logs

Environment

EnvironmentLaravel Version: 13.16.1PHP Version: 8.3.22Composer Version: 2.9.7Environment: localDebug Mode: ENABLEDMaintenance Mode: OFFTimezone: UTCLocale: enCacheConfig: NOT CACHEDEvents: NOT CACHEDRoutes: NOT CACHEDViews: CACHEDDriversBroadcasting: logCache: fileDatabase: sqliteLogs: stack / singleMail: logQueue: syncSession: fileStoragepublic/storage: NOT LINKEDStatamicAddons: 0License Key: Not setSites: 1Stache Watcher: Enabled (auto)Static Caching: DisabledVersion: 6.21.0 Solo

Installation

Starter Kit using via CLI

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions