Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Form] Fixed ChoiceType trim option#9598

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
wouterj merged 5 commits intosymfony:2.7fromHeahDude:choice-trim
May 8, 2018
Merged
Show file tree
Hide file tree
Changes fromall 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
5 changes: 4 additions & 1 deletionreference/forms/types/choice.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,6 +30,7 @@ To use this field, you must specify *either* ``choices`` or ``choice_loader`` op
| Overridden | - `compound`_ |
| options | - `empty_data`_ |
| | - `error_bubbling`_ |
| | - `trim`_ |
+-------------+------------------------------------------------------------------------------+
| Inherited | - `attr`_ |
| options | - `by_reference`_ |
Expand DownExpand Up@@ -106,7 +107,7 @@ method::
'choice_attr' => function($category, $key, $index) {
return ['class' => 'category_'.strtolower($category->getName())];
},

'group_by' => function($category, $key, $index) {
// randomly assign things into 2 groups
return rand(0, 1) == 1 ? 'Group A' : 'Group B';
Expand DownExpand Up@@ -323,6 +324,8 @@ error_bubbling
Set that error on this field must be attached to the field instead of
the parent field (the form in most cases).

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

Inherited Options
-----------------

Expand Down
3 changes: 3 additions & 0 deletionsreference/forms/types/country.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,6 +33,7 @@ you should just use the ``choice`` type directly.
| | - `multiple`_ |
| | - `placeholder`_ |
| | - `preferred_choices`_ |
| | - `trim`_ |
| | |
| | from the :doc:`form </reference/forms/types/form>` type |
| | |
Expand DownExpand Up@@ -80,6 +81,8 @@ type:

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

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

These options inherit from the :doc:`form </reference/forms/types/form>`
type:

Expand Down
3 changes: 3 additions & 0 deletionsreference/forms/types/currency.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,6 +26,7 @@ you should just use the ``choice`` type directly.
| | - `multiple`_ |
| | - `placeholder`_ |
| | - `preferred_choices`_ |
| | - `trim`_ |
| | |
| | from the :doc:`form </reference/forms/types/form>` type |
| | |
Expand DownExpand Up@@ -70,6 +71,8 @@ type:

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

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

These options inherit from the :doc:`form</reference/forms/types/form>`
type:

Expand Down
3 changes: 3 additions & 0 deletionsreference/forms/types/entity.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,6 +32,7 @@ objects from the database.
| | - `placeholder`_ |
| | - `preferred_choices`_ |
| | - `translation_domain`_ |
| | - `trim`_ |
| | |
| | from the :doc:`form </reference/forms/types/form>` type: |
| | |
Expand DownExpand Up@@ -264,6 +265,8 @@ type:

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

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

These options inherit from the :doc:`form </reference/forms/types/form>`
type:

Expand Down
3 changes: 3 additions & 0 deletionsreference/forms/types/language.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,6 +35,7 @@ you should just use the ``choice`` type directly.
| | - `multiple`_ |
| | - `placeholder`_ |
| | - `preferred_choices`_ |
| | - `trim`_ |
| | |
| | from the :doc:`form </reference/forms/types/form>` type |
| | |
Expand DownExpand Up@@ -82,6 +83,8 @@ type:

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

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

These options inherit from the :doc:`form </reference/forms/types/form>`
type:

Expand Down
3 changes: 3 additions & 0 deletionsreference/forms/types/locale.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,6 +36,7 @@ you should just use the ``choice`` type directly.
| | - `multiple`_ |
| | - `placeholder`_ |
| | - `preferred_choices`_ |
| | - `trim`_ |
| | |
| | from the :doc:`form </reference/forms/types/form>` type |
| | |
Expand DownExpand Up@@ -83,6 +84,8 @@ type:

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

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

These options inherit from the :doc:`form </reference/forms/types/form>`
type:

Expand Down
7 changes: 7 additions & 0 deletionsreference/forms/types/options/choice_type_trim.rst.inc
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
trim
~~~~

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

Trimming is disabled by default because the selected value or values must match
the given choice values exactly (and they could contain whitespaces).
3 changes: 3 additions & 0 deletionsreference/forms/types/timezone.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,6 +27,7 @@ you should just use the ``choice`` type directly.
| | - `multiple`_ |
| | - `placeholder`_ |
| | - `preferred_choices`_ |
| | - `trim`_ |
| | |
| | from the :doc:`form </reference/forms/types/form>` type |
| | |
Expand DownExpand Up@@ -72,6 +73,8 @@ type:

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

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

These options inherit from the :doc:`form </reference/forms/types/form>`
type:

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp