contao / core

Contao 3 → see contao/contao for Contao 4
GNU Lesser General Public License v3.0
490 stars 213 forks source link

Add name attribute to fieldset #7160

Open aschempp opened 10 years ago

aschempp commented 10 years ago

Please add support for the name attribute (and ID as "ctrl_name") for fieldset group start widget in form generator. This would be helpful to access the fieldset using javascript.

See http://www.w3.org/wiki/HTML/Elements/fieldset

@qzminski

qzminski commented 10 years ago

I would need to override the default template for that (form_fieldset).

https://github.com/contao/core/blob/master/system/modules/core/templates/forms/form_fieldset.html5

aschempp commented 10 years ago

That's why this is a feature request for Contao Core ;-)

qzminski commented 10 years ago

Omg :blush:

qzminski commented 10 years ago

+1

leofeyer commented 10 years ago

Will do. Just curious: does adding the "name" attribute add any form data to the request?

aschempp commented 10 years ago

Hmm, we would probably need to test that. Does not much sense to me, but MDN says

«The name associated with the group, which is submitted with the form data.»

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset

leofeyer commented 10 years ago

Hm, so this will have side-effects. Are we sure that we need this?

aschempp commented 8 years ago

Looks like a feature for Contao 4 to me

leofeyer commented 8 years ago

What about the side-effects?

aschempp commented 8 years ago

We need to test them… I would be fine with an ID field only (and probably a class) which should be fairly simple?

leofeyer commented 8 years ago

An ID field will not be a problem.