Skip to content

[Form] : add a tip for debug:form command #18824

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

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,33 @@ much easier to implement.
There are tens of :doc:`form types provided by Symfony </reference/forms/types>`
and you can also :doc:`create your own form types </form/create_custom_field_type>`.

.. tip::

You can use the ``debug:form`` to list all the available types, type
extensions and type guessers in your application:

.. code-block:: terminal

$ php bin/console debug:form

If you pass a form type as the first argument, the command shows the options
defined for that type, its parents and its extensions.
For built-in types the short classname is enough, however other types
require the FQCN:

.. code-block:: terminal

$ php bin/console debug:form BirthdayType

If you pass both a form type class and an option name, the command displays
the full definition of the given option:

.. code-block:: terminal

$ php bin/console debug:form BirthdayType label_attr

You can see all the command options by running ``--help``.

Building Forms
--------------

Expand Down