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

Environment
Laravel Version: 13.16.1
PHP Version: 8.3.22
Composer Version: 2.9.7
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Statamic
Addons: 0
License Key: Not set
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.21.0 Solo

Installation

Starter Kit using via CLI

Additional details

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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