Skip to content

Add fields property to FieldSet class - #1506

Merged
mjauvin merged 1 commit into
wintercms:fieldset-formwidgetfrom
AIC-BV:patch-31
Aug 4, 2026
Merged

Add fields property to FieldSet class#1506
mjauvin merged 1 commit into
wintercms:fieldset-formwidgetfrom
AIC-BV:patch-31

Conversation

@AIC-BV

@AIC-BV AIC-BV commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Seems to work with a small fix, even with fieldsets within fieldsets!

Out of the box the fieldsets rendered empty — legend only, zero fields. Root cause: FieldSet::init() calls fillFromConfig(['fields']), but WidgetBase::fillFromConfig() only fills properties that exist on the class (property_exists check), and FieldSet declares public $form but not public $fields. So the inner form always got fields => null, silently. I added public $fields; to FieldSet.php:27 locally and everything came to life. Claude

image

The dark scheme might need some adjusting

@media (prefers-color-scheme: dark) {
    .fieldset {
        background: #000;
    }
}
image

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bd35beb8-94b9-4137-b3f8-e3d5a18c9904

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mjauvin
mjauvin merged commit b6a5d3b into wintercms:fieldset-formwidget Aug 4, 2026
13 checks passed
@mjauvin

mjauvin commented Aug 4, 2026

Copy link
Copy Markdown
Member

Thanks, I merged your changes and removed the (now unused) $form property.

Can you test again to make sure?

@AIC-BV

AIC-BV commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, I merged your changes and removed the (now unused) $form property.

Can you test again to make sure?

Works 👍

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.

2 participants