Skip to content

[6.x] Forms 2: Prefix internal submission keys with an underscore - #15637

Merged
jasonvarga merged 3 commits into
forms-2from
forms-2-submission-meta-keys
Oct 12, 2026
Merged

jasonvarga merged 3 commits into
forms-2from
forms-2-submission-meta-keys

Conversation

@jasonvarga

Copy link
Copy Markdown
Member

Submissions store their internal lifecycle metadata (partial, site) inline in their data. This renames those keys to _partial and _site so they're visibly internal and can't collide with form field handles. Neither key exists on a released version, so there's nothing to migrate.

  • asPartial(), isPartial(), finalize(), site() and whereStatus() use the new keys. where('site', $handle) still works since it resolves through site().
  • Adds Submission::values(), which returns the data without _-prefixed keys (_partial, _site, _fake). data() is untouched, so writes through it still persist.
  • The AJAX form success response now returns values() rather than data(), so internal keys aren't exposed to visitors. Webhooks, exporters, emails and augmentation already only output blueprint fields.
  • {{ form:submissions }} only skips its finalized-only default for status: conditions. The old partial: check no longer refers to anything, and Antlers drops _-prefixed params so _partial: isn't usable either. A user field named partial no longer disables the default.
  • partial and site are now usable as form field handles. Handles starting with _ were already rejected by the Handle rule; this is now covered by a test.

values() isn't added to the Submission contract, as that would break direct implementers.

The eloquent driver will need to mirror the _partial/_site keys in whereStatus and its site queries.

jasonvarga and others added 3 commits October 12, 2026 16:51
Store partial and site as _partial and _site so they're visibly internal and can't collide with form field handles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
values() returns the submission data without underscore-prefixed internal keys. The AJAX form success response used data(), which exposed them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ions

The partial condition no longer refers to the internal key, and Antlers drops underscore-prefixed params so _partial can't be used either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jasonvarga
jasonvarga merged commit 7a7ab96 into forms-2 Oct 12, 2026
62 checks passed
@jasonvarga
jasonvarga deleted the forms-2-submission-meta-keys branch October 12, 2026 21:08
jasonvarga added a commit that referenced this pull request Oct 12, 2026
Brings in #15637's underscore-prefixed internal keys. Spam now uses _spam: it's carried over by the data setter and used in whereStatus(), and the tag's queryStatus() no longer yields to partial:* or spam:* conditions, since Antlers drops underscore-prefixed params. Tests updated to the prefixed keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant