Skip to content

[6.x] Show select option labels for numeric keys in form submissions - #15744

Merged
jasonvarga merged 1 commit into
statamic:6.xfrom
mynetx:fix/select-numeric-key-labels
Oct 30, 2026
Merged

jasonvarga merged 1 commit into
statamic:6.xfrom
mynetx:fix/select-numeric-key-labels

Conversation

@mynetx

@mynetx mynetx commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Front-end form submissions store select values as strings, so a field with numeric option keys (e.g. key: 926450000) is saved as '926450000'. The CP then compares that against the integer key, finds no option, and shows the raw key instead of the label, both in the submissions list and on the submission itself. String keys aren't affected.

Entries don't hit this because the CP saves the integer, which is probably why #12840 couldn't reproduce it. To reproduce: give a form a select with numeric keys, submit it from the front end, and open its submissions.

This maps the string back to the matching integer key in preProcess(), which covers both views. An exact key match still wins, and it only matches the exact string, so '01' doesn't match key 1.

Before After
12667-list-before 12667-list-after
12667-detail-before 12667-detail-after

Fixes #12667

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jasonvarga
jasonvarga merged commit e308614 into statamic:6.x Oct 30, 2026
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent Select fieldtype form submission handling

2 participants