Issue Bug Closed

#102291Add fluidAdditionalAttributes to Fieldset elements

Henrik Ziegenhain 10/30/23, 15:52 updated 10/15/24, 09:30

Description

Currently it is not possible to pass additionalAttributes to “Fieldset” form elements.
For (nearly?) all other element it is possible.

In typo3/sysext/form/Resources/Private/Frontend/Partials/Fieldset.html just replace

<fieldset id="{element.uniqueIdentifier}" class="{element.properties.elementClassAttribute}">

with

    <f:variable name="additionalAttributes" value="" />
    <f:for as="value" key="key" each="{formvh:translateElementProperty(element: element, property: 'fluidAdditionalAttributes')}">
        <f:variable name="additionalAttributes" value='{additionalAttributes} {key}="{value}"' />
    </f:for>
    <fieldset id="{element.uniqueIdentifier}" class="{element.properties.elementClassAttribute}" {additionalAttributes -> f:format.raw()}>

Reviews 4