Open evotodi opened 2 weeks ago
When trying to add an html attribute to a filed set the attribute is not added. Symfony: 7.0 Easyadmin: 4.9.4 and 4.10.0
To Reproduce Add a fieldset with a html attribute using setHtmlAttribute
yield FormField::addFieldset('Static Network')->setHtmlAttribute('data-admin-vision-box-target', 'staticFieldSet')->addCssClass('evotodi');
Or using setFormTypeOptions
yield FormField::addFieldset('Static Network')->setFormTypeOptions(['attr' => ['data-admin-vision-box-target' => 'staticFieldSet']])->addCssClass('evotodi');
The addCssClass is there to easily find the fieldset and does work but does not effect the results.
Resulting html:
<div id="tab-networking" class="tab-pane field-form_tab active show" role="tabpanel" aria-labelledby="tablist-tab-networking"> <div class="row"> <div class="form-fieldset field-form_fieldset evotodi"> <fieldset> <div class="form-fieldset-header "> <div class="form-fieldset-title"> <span class="not-collapsible form-fieldset-title-content">Static Network</span> </div> </div> <div id="content-ea_form_fieldset_01HWDBH1GYEDD4CFM5Q3KB32Y7" class="form-fieldset-body show"> <div class="row"> ... </div> </div> </fieldset> </div> </div> </div>
Expected result:
... <div class="form-fieldset field-form_fieldset evotodi" data-admin-vision-box-target="staticFieldSet"> ...
Adding a attribute to a tab does work as expected. What am I missing?
When trying to add an html attribute to a filed set the attribute is not added. Symfony: 7.0 Easyadmin: 4.9.4 and 4.10.0
To Reproduce Add a fieldset with a html attribute using setHtmlAttribute
Or using setFormTypeOptions
The addCssClass is there to easily find the fieldset and does work but does not effect the results.
Resulting html:
Expected result:
Adding a attribute to a tab does work as expected. What am I missing?