laminas / laminas-form

Validate and display simple and complex forms, casting forms to business objects and vice versa
https://docs.laminas.dev/laminas-form/
BSD 3-Clause "New" or "Revised" License
80 stars 52 forks source link

Allow disabled- and form-Attribute on fieldsets #255

Closed mimmi20 closed 8 months ago

mimmi20 commented 8 months ago
Q A
Documentation no
Bugfix no
BC Break no
New Feature yes
RFC no
QA no

Description

This PR wants to allow the Attributes "disabled" and "form" on fieldsets. This is related to Issue #155.

froschdesign commented 8 months ago

@mimmi20 The name attribute is removed here:

https://github.com/laminas/laminas-form/blob/06ececc7fa3a5d1fffcb68c884e338ff5092374b/src/View/Helper/FormCollection.php#L139-L141

A replacement can be:

if (! $this->getDoctypeHelper()->isHtml5()) {
    unset(
        $attributes['name'],
        $attributes['disabled'],
        $attributes['form']
    );
}

The doctypesAllowedToHaveNameAttribute property can then be removed:

https://github.com/laminas/laminas-form/blob/06ececc7fa3a5d1fffcb68c884e338ff5092374b/src/View/Helper/FormCollection.php#L80-L83

Slamdunk commented 8 months ago

Thank you :confetti_ball: