[6.x] Fix hidden fieldtypes ignoring their field conditions - #15132
Merged
jasonvarga merged 1 commit intoAug 6, 2026
Conversation
lazerg
force-pushed
the
fix/issue-15131-hidden-field-default
branch
from
August 6, 2026 12:58
f4166e4 to
4349408
Compare
Contributor
|
Thanks for this! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A field with a
hiddenfieldtype saves its default value even when its conditions say it shouldn't be there. The reporter uses one to setprotect: passwordonly when a toggle is on, so after upgrading to v6 every entry save wrote the password scheme and locked the page behind a 403.Field conditions are evaluated in
Publish/Field.vue, which registers whether the value should be omitted from what gets submitted. Since #12970,Publish/Fields.vuefilters hidden fieldtypes out of the list before it renders, so their conditions are never evaluated and their values are never omitted. Before that they were rendered like any other field and just hidden with CSS.This moves the form submission check into the field itself, so hidden fieldtypes take part in field conditions again while still being invisible everywhere except a form submission.
Fixes #15131