Skip to content

[6.x] Forms 2: Hide hidden linked fields on the front end - #15967

Merged
jasonvarga merged 1 commit into
forms-2from
forms-2-fix-b10-linked-hidden
Nov 19, 2026
Merged

jasonvarga merged 1 commit into
forms-2from
forms-2-fix-b10-linked-hidden

Conversation

@jasonvarga

Copy link
Copy Markdown
Member

Linked form fields (fields that reference a fieldset field) that are hidden still rendered on front-end forms. FormFields::toBlueprint() dropped hidden fields by reading $config['field']['hidden'], but for linked fields field is the reference string (e.g. details.company), so the check never matched.

Hidden is now resolved from the fieldset field's config merged with the linked field's overrides, so:

  • a linked field hidden in the builder ("Always hide" or the canvas eye button, stored as a hidden: true override) is hidden,
  • a linked field whose fieldset field is hidden: true is hidden, unless overridden with hidden: false,
  • inline fields behave as before.

A missing fieldset field isn't treated as hidden here; the existing "field not found" handling still applies when the blueprint resolves it.

Tests

  • FormFieldsTest::it_excludes_hidden_linked_fields_from_blueprint (fails without the fix).

`toBlueprint()` only checked `hidden` on inline fields. For linked fields `field` is the reference string, so hidden linked fields (via an override or the fieldset field itself) still rendered on the front end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jasonvarga
jasonvarga merged commit a66bcd1 into forms-2 Nov 19, 2026
62 checks passed
@jasonvarga
jasonvarga deleted the forms-2-fix-b10-linked-hidden branch November 19, 2026 16:14
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