1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-21 21:40:48 +00:00

Remove incorrect statement about the disabled attribute on <form> (#35713)

> You can disable every form element within a form with the `disabled` attribute on the `<form>`.

I really want to be mistaken, because this would be a very useful feature! But I don't believe it's true. I can't find anything about this on MDN Web Docs, and adding the `disabled` attribute to a `<form>` does nothing on any browser in my testing.

The `disabled` attribute on a `<fieldset>` does disable all descendant form controls – perhaps that's where the mixup has come from.
This commit is contained in:
Toby Zerner 2022-02-01 17:40:59 +11:00 committed by GitHub
parent 9d44b603d5
commit 22bbff0b03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,6 @@ Every group of form fields should reside in a `<form>` element. Bootstrap provid
- New to browser forms? Consider reviewing [the MDN form docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) for an overview and complete list of available attributes.
- `<button>`s within a `<form>` default to `type="submit"`, so strive to be specific and always include a `type`.
- You can disable every form element within a form with the `disabled` attribute on the `<form>`.
Since Bootstrap applies `display: block` and `width: 100%` to almost all our form controls, forms will by default stack vertically. Additional classes can be used to vary this layout on a per-form basis.