Skip to content

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

Closed
wants to merge 2 commits into from
Closed

Update forms.rst #11222

wants to merge 2 commits into from

Conversation

ThomasLandauer
Copy link
Contributor

Just some minor improvements. More to come...

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.
@ThomasLandauer
Copy link
Contributor Author

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: /form/*?

@xabbuh
Copy link
Member

xabbuh commented Mar 26, 2019

Is it really necessary to move so much stuff around? This makes it quite hard to review the changes.

@xabbuh xabbuh added this to the 3.4 milestone Mar 26, 2019
@ThomasLandauer
Copy link
Contributor Author

ThomasLandauer commented Mar 26, 2019

Is it really necessary to move so much stuff around?

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
Copy link
Member

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?

Copy link
Contributor Author

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
Copy link
Member

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.

Copy link
Contributor Author

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 ;-)

@HeahDude
Copy link
Contributor

HeahDude commented Feb 7, 2020

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.
So I'm going to close here, feel free to propose your changes by opening a new PR targeting master, thank you for understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants