Skip to content

Commit

Permalink
feature #4892 Add possible values for widget_type (XitasoChris)
Browse files Browse the repository at this point in the history
This PR was submitted for the 2.6 branch but it was merged into the 2.3 branch instead (closes #4892).

Discussion
----------

Add possible values for widget_type

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets |

The documentation does not list which values are possible for widget_type. These two are the ones I extracted from the Symfony2 source code.

Commits
-------

e57c2ac terminate file with newline
ef9e1bd move title back and move description to separate file as suggested in PR #4892
6b42685 move title out of included file as suggested in PR #4892
6fcdd89 Add possible values for widget_type
  • Loading branch information
weaverryan committed Mar 24, 2015
2 parents 49314e7 + e57c2ac commit 50cd620
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
4 changes: 1 addition & 3 deletions reference/forms/types/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ for more details.
date_widget
~~~~~~~~~~~

**type**: ``string`` **default**: ``choice``

Defines the ``widget`` option for the :doc:`date </reference/forms/types/date>` type
.. include:: /reference/forms/types/options/date_widget_description.rst.inc

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

Expand Down
12 changes: 1 addition & 11 deletions reference/forms/types/options/date_widget.rst.inc
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
widget
~~~~~~

**type**: ``string`` **default**: ``choice``

The basic way in which this field should be rendered. Can be one of the following:

* ``choice``: renders three select inputs. The order of the selects is defined
in the `format`_ option.

* ``text``: renders a three field input of type ``text`` (month, day, year).

* ``single_text``: renders a single input of type ``date``. User's input is
validated based on the `format`_ option.
.. include:: /reference/forms/types/options/date_widget_description.rst.inc
11 changes: 11 additions & 0 deletions reference/forms/types/options/date_widget_description.rst.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**type**: ``string`` **default**: ``choice``

The basic way in which this field should be rendered. Can be one of the following:

* ``choice``: renders three select inputs. The order of the selects is defined
in the `format`_ option.

* ``text``: renders a three field input of type ``text`` (month, day, year).

* ``single_text``: renders a single input of type ``date``. User's input is
validated based on the `format`_ option.

0 comments on commit 50cd620

Please sign in to comment.