-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Update forms.rst #11222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update forms.rst #11222
Conversation
Just some minor improvements. More to come...
Integrating the findings of EasyCorp/EasyAdminBundle#2673 (comment) Reason for moving the block "HTML5 Validation" down: This is just not true!: "Generated forms take full advantage of this new feature by adding sensible HTML attributes that trigger the validation." This only works if the type guesser is active, and this was only explained way later. Reason for moving blocks "The required Option" and "label" down: `required` was mentioned in 3 (!) places before, now it's just one. Reason for joining "Field Type Guessing" and "Field Type Options Guessing": The latter mainly repeated stuff already explained in the former. Symfony's "Field Type Guessing" feature is (a) powerful and (b) obscure. It's a requirement to understand, in order to be able to understand what's going on in the form's view. Since it's now higher up on the page, more people will read it.
Question: How can I change the order of the "Learn more"-links https://symfony.com/doc/3.4/forms.html#learn-more ? What does this placeholder mean: |
Is it really necessary to move so much stuff around? This makes it quite hard to review the changes. |
Yes!!! :-) One of the problems of the "old" page was that the same stuff was explained over and over... I didn't delete much, most stuff is just elsewhere |
Many of these are specific to the field type and details can be found in | ||
the documentation for each type. | ||
|
||
.. sidebar:: The ``required`` Option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason to remove this section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, doesn't contain any relevant information. The documentation is linked anyway.
The label for a field can also be set in the template rendering the | ||
form, see below. If you don't need a label associated to your input, | ||
you can disable it by setting its value to ``false``. | ||
|
||
.. index:: | ||
single: Forms; Field type guessing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move the whole section about form type (and type options) guessing into a dedicated article. Handling this here in the main article about forms can be confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I don't say that this is the perfect solution for everything. I'm just saying that it's better than it was ;-)
I'm really sorry but the changes are almost impossible to review or merge up into master due to changes in all branches since you've opened that PR. |
Just some minor improvements. More to come...