Render HTML attributes on form fieldset wrapper#7593
Merged
javiereguiluz merged 1 commit intoEasyCorp:4.xfrom May 5, 2026
Merged
Conversation
58f8950 to
5bd4eef
Compare
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
5bd4eef to
5373ce7
Compare
Collaborator
|
Thanks Louis-Arnaud! I merged it in 4.x (and 5.x) because I think this was a bug fix more than a feature. |
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.
FormField::addFieldset()->setHtmlAttribute('foo', 'bar')had no effect: theea_form_fieldset_open_rowblock in the form theme rendered the wrapper<div>with a fixed class list and never projectedform.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()andsetFormTypeOptions(['attr' => [...]])reach the rendered DOM.Closes #6285