Skip to content

[Form] Move some docs from the Choice constraint to the ChoiceType #19920

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
May 30, 2024
Merged
Show file tree
Hide file tree
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
26 changes: 0 additions & 26 deletions reference/constraints/Choice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -389,29 +389,3 @@ Parameter Description
=============== ==============================================================

.. include:: /reference/constraints/_payload-option.rst.inc

``separator``
~~~~~~~~~~~~~

**type**: ``string`` **default**: ``-------------------``

This option allows you to customize the visual separator shown after the preferred
choices. You can use HTML elements like ``<hr>`` to display a more modern separator,
but you'll also need to set the `separator_html`_ option to ``true``.

.. versionadded:: 7.1

The ``separator`` option was introduced in Symfony 7.1.

``separator_html``
~~~~~~~~~~~~~~~~~~

**type**: ``boolean`` **default**: ``false``

If this option is true, the `separator`_ option will be displayed as HTML instead
of text. This is useful when using HTML elements (e.g. ``<hr>``) as a more modern
visual separator.

.. versionadded:: 7.1

The ``separator_html`` option was introduced in Symfony 7.1.
26 changes: 26 additions & 0 deletions reference/forms/types/choice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,32 @@ correct types will be assigned to the model.

.. include:: /reference/forms/types/options/preferred_choices.rst.inc

``separator``
~~~~~~~~~~~~~

**type**: ``string`` **default**: ``-------------------``

This option allows you to customize the visual separator shown after the preferred
choices. You can use HTML elements like ``<hr>`` to display a more modern separator,
but you'll also need to set the `separator_html`_ option to ``true``.

.. versionadded:: 7.1

The ``separator`` option was introduced in Symfony 7.1.

``separator_html``
~~~~~~~~~~~~~~~~~~

**type**: ``boolean`` **default**: ``false``

If this option is true, the `separator`_ option will be displayed as HTML instead
of text. This is useful when using HTML elements (e.g. ``<hr>``) as a more modern
visual separator.

.. versionadded:: 7.1

The ``separator_html`` option was introduced in Symfony 7.1.

Overridden Options
------------------

Expand Down
Loading