Skip to content

Commit feee616

Browse files
committed
[forms] Initial import of the new forms documentation (WIP)
This includes stub articles for field types references.
1 parent 2359f4b commit feee616

34 files changed

+765
-10
lines changed

book/forms.rst

Lines changed: 513 additions & 0 deletions
Large diffs are not rendered by default.

book/images/forms-simple.png

11.2 KB
Loading

book/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Book
1313
templating
1414
testing
1515
validation
16-
forms/index
16+
forms
1717
security/index
1818
http_cache
1919
translation

book/map.rst.inc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@
1616
* :doc:`MongoDB </book/doctrine/mongodb-odm/index>`
1717

1818
* :doc:`Validation </book/validation>`
19-
20-
* **Forms**:
21-
22-
* :doc:`Overview </book/forms/overview>` |
23-
* :doc:`Templates </book/forms/view>` |
24-
* :doc:`Form Fields </book/forms/fields>`
19+
* :doc:`Forms </book/forms>`
2520

2621
* **Security**:
2722

book/validation.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ objects that can then be displayed with your form:
204204
$this->render('BlogBundle:Author:form.html.twig', array('form' => $form));
205205
}
206206
207-
For more information, see the :doc:`Forms</book/forms/overview>` chapter.
207+
For more information, see the :doc:`Forms</book/forms>` chapter.
208208

209209
.. index::
210210
pair: Validation; Configuration
@@ -223,7 +223,6 @@ configuration:
223223
framework:
224224
validation: { enabled: true, annotations: true }
225225
226-
227226
.. code-block:: xml
228227
229228
<!-- app/config/config.xml -->

reference/forms/types.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
.. index::
2+
single: Forms; Types Reference
3+
4+
Form Types Reference
5+
====================
6+
7+
.. toctree::
8+
:maxdepth: 1
9+
:hidden:
10+
11+
types/birthday
12+
types/checkbox
13+
types/choice
14+
types/collection
15+
types/country
16+
types/csrf
17+
types/date
18+
types/datetime
19+
types/file
20+
types/form
21+
types/hidden
22+
types/integer
23+
types/language
24+
types/locale
25+
types/money
26+
types/number
27+
types/password
28+
types/percent
29+
types/radio
30+
types/repeated
31+
types/text
32+
types/textarea
33+
types/time
34+
types/timezone
35+
types/url
36+
37+
A form is composed of *fields*, each of which is set to a specific field
38+
type (e.g. a ``text`` type, ``choice`` type, etc). Symfony2 comes standard
39+
with a large list of types that can be used in your application.
40+
41+
Supported Field Types
42+
---------------------
43+
44+
The following field types are natively available in Symfony2:
45+
46+
.. include:: /reference/forms/types/map.rst.inc

reference/forms/types/birthday.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. index::
2+
single: Forms; Fields; birthday
3+
4+
``birthday`` Field Type
5+
=======================
6+
7+
See :class:`Symfony\\Component\\Form\\Type\\BirthdayType`.

reference/forms/types/checkbox.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. index::
2+
single: Forms; Fields; checkbox
3+
4+
``checkbox`` Field Type
5+
=======================
6+
7+
See :class:`Symfony\\Component\\Form\\Type\\CheckboxType`.

reference/forms/types/choice.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. index::
2+
single: Forms; Fields; choice
3+
4+
``choice`` Field Type
5+
=====================
6+
7+
See :class:`Symfony\\Component\\Form\\Type\\ChoiceType`.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. index::
2+
single: Forms; Fields; collection
3+
4+
``collection`` Field Type
5+
=========================
6+
7+
See :class:`Symfony\\Component\\Form\\Type\\CollectionType`.

0 commit comments

Comments
 (0)