Skip to content

Render HTML attributes on form fieldset wrapper#7593

Merged
javiereguiluz merged 1 commit intoEasyCorp:4.xfrom
lacatoire:fix-formfield-fieldset-html-attributes-6285
May 5, 2026
Merged

Render HTML attributes on form fieldset wrapper#7593
javiereguiluz merged 1 commit intoEasyCorp:4.xfrom
lacatoire:fix-formfield-fieldset-html-attributes-6285

Conversation

@lacatoire
Copy link
Copy Markdown
Contributor

FormField::addFieldset()->setHtmlAttribute('foo', 'bar') had no effect: the ea_form_fieldset_open_row block in the form theme rendered the wrapper <div> with a fixed class list and never projected form.vars.attr, while the sibling tab pane block (ea_form_tabpane_open_row) already loops over it.

Mirror the same loop on the fieldset wrapper so setHtmlAttribute() and setFormTypeOptions(['attr' => [...]]) reach the rendered DOM.

Closes #6285

@lacatoire lacatoire force-pushed the fix-formfield-fieldset-html-attributes-6285 branch from 58f8950 to 5bd4eef Compare May 4, 2026 13:38
@javiereguiluz javiereguiluz added this to the 4.x milestone May 5, 2026
FormField::addFieldset()->setHtmlAttribute('foo', 'bar') had no effect: the
"ea_form_fieldset_open_row" block in the form theme rendered the wrapper
<div> with a fixed class list and no projection of form.vars.attr, while
the sibling tab pane block (line 627) already loops over form.vars.attr to
render each entry as an HTML attribute.

Mirror the same loop on the fieldset wrapper so setHtmlAttribute() and
setFormTypeOptions(['attr' => [...]]) actually reach the rendered DOM.

Closes EasyCorp#6285
@javiereguiluz javiereguiluz changed the base branch from 5.x to 4.x May 5, 2026 19:56
@javiereguiluz javiereguiluz force-pushed the fix-formfield-fieldset-html-attributes-6285 branch from 5bd4eef to 5373ce7 Compare May 5, 2026 19:56
@javiereguiluz javiereguiluz merged commit 3f9a759 into EasyCorp:4.x May 5, 2026
17 checks passed
@javiereguiluz
Copy link
Copy Markdown
Collaborator

javiereguiluz commented May 5, 2026

Thanks Louis-Arnaud! I merged it in 4.x (and 5.x) because I think this was a bug fix more than a feature.

@lacatoire lacatoire deleted the fix-formfield-fieldset-html-attributes-6285 branch May 6, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FormField::addFieldset setHtmlAttribute does nothing

2 participants