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.
How to reproduce
- Clone repository: https://github.com/helloiamlukas/no-label-for-dictionary-fields
- 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
Bug description
A single-select dictionary field (
max_items: 1) with a dictionary whichoptions()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.How to reproduce
Logs
Environment
Installation
Starter Kit using via CLI
Additional details
No response