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

Appearance settings

Commit 5bdf708

Browse filesBrowse files
Mathieu Piotjaviereguiluz
authored andcommitted
Add help option to FormType
1 parent 4fb19c2 commit 5bdf708
Copy full SHA for 5bdf708
Expand file treeCollapse file tree

36 files changed

+125
-0
lines changed

‎form/form_customization.rst

Copy file name to clipboardExpand all lines: form/form_customization.rst
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ You can also render each of the three parts of the field individually:
3636
{{ form_label(form.age) }}
3737
{{ form_errors(form.age) }}
3838
{{ form_widget(form.age) }}
39+
{{ form_help(form.age) }}
3940
</div>
4041

4142
.. code-block:: php
@@ -796,6 +797,7 @@ You can also override the markup for an entire field row using the same method:
796797
{{ form_label(form) }}
797798
{{ form_errors(form) }}
798799
{{ form_widget(form) }}
800+
{{ form_help(form) }}
799801
</div>
800802
{% endblock %}
801803

@@ -1024,6 +1026,7 @@ class to the ``div`` element around each row:
10241026
{{ form_label(form) }}
10251027
{{ form_errors(form) }}
10261028
{{ form_widget(form) }}
1029+
{{ form_help(form) }}
10271030
</div>
10281031
{% endblock form_row %}
10291032

‎form/form_themes.rst

Copy file name to clipboardExpand all lines: form/form_themes.rst
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ do this, create a new template file that will store the new markup:
3535
{{ form_label(form) }}
3636
{{ form_errors(form) }}
3737
{{ form_widget(form) }}
38+
{{ form_help(form) }}
3839
</div>
3940
{% endspaceless %}
4041
{% endblock form_row %}
@@ -135,6 +136,8 @@ are 4 possible *parts* of a form that can be rendered:
135136
+-------------+----------------------------+---------------------------------------------------------+
136137
| ``errors`` | (e.g. ``form_errors()``) | renders the field's errors |
137138
+-------------+----------------------------+---------------------------------------------------------+
139+
| ``help`` | (e.g. ``form_help()``) | renders the field's help |
140+
+-------------+----------------------------+---------------------------------------------------------+
138141
| ``row`` | (e.g. ``form_row()``) | renders the field's entire row (label, widget & errors) |
139142
+-------------+----------------------------+---------------------------------------------------------+
140143

‎form/rendering.rst

Copy file name to clipboardExpand all lines: form/rendering.rst
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,14 @@ used the ``form_row()`` helper:
8282
{{ form_label(form.task) }}
8383
{{ form_errors(form.task) }}
8484
{{ form_widget(form.task) }}
85+
{{ form_help(form.task) }}
8586
</div>
8687

8788
<div>
8889
{{ form_label(form.dueDate) }}
8990
{{ form_errors(form.dueDate) }}
9091
{{ form_widget(form.dueDate) }}
92+
{{ form_help(form.dueDate) }}
9193
</div>
9294

9395
<div>

‎reference/forms/types/birthday.rst

Copy file name to clipboardExpand all lines: reference/forms/types/birthday.rst
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ option defaults to 120 years ago to the current year.
3838
| | |
3939
| | - `data`_ |
4040
| | - `disabled`_ |
41+
| | - `help`_ |
4142
| | - `inherit_data`_ |
4243
| | - `invalid_message`_ |
4344
| | - `invalid_message_parameters`_ |
@@ -108,6 +109,8 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
108109

109110
.. include:: /reference/forms/types/options/disabled.rst.inc
110111

112+
.. include:: /reference/forms/types/options/help.rst.inc
113+
111114
.. include:: /reference/forms/types/options/inherit_data.rst.inc
112115

113116
.. include:: /reference/forms/types/options/invalid_message.rst.inc

‎reference/forms/types/checkbox.rst

Copy file name to clipboardExpand all lines: reference/forms/types/checkbox.rst
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ true, if the box is unchecked, the value will be set to false.
2020
| options | - `disabled`_ |
2121
| | - `error_bubbling`_ |
2222
| | - `error_mapping`_ |
23+
| | - `help`_ |
2324
| | - `label`_ |
2425
| | - `label_attr`_ |
2526
| | - `label_format`_ |
@@ -69,6 +70,8 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
6970

7071
.. include:: /reference/forms/types/options/error_mapping.rst.inc
7172

73+
.. include:: /reference/forms/types/options/help.rst.inc
74+
7275
.. include:: /reference/forms/types/options/label.rst.inc
7376

7477
.. include:: /reference/forms/types/options/label_attr.rst.inc

‎reference/forms/types/choice.rst

Copy file name to clipboardExpand all lines: reference/forms/types/choice.rst
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ To use this field, you must specify *either* ``choices`` or ``choice_loader`` op
3434
| | - `data`_ |
3535
| | - `disabled`_ |
3636
| | - `error_mapping`_ |
37+
| | - `help`_ |
3738
| | - `inherit_data`_ |
3839
| | - `label`_ |
3940
| | - `label_attr`_ |
@@ -264,6 +265,8 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
264265

265266
.. include:: /reference/forms/types/options/error_mapping.rst.inc
266267

268+
.. include:: /reference/forms/types/options/help.rst.inc
269+
267270
.. include:: /reference/forms/types/options/inherit_data.rst.inc
268271

269272
.. include:: /reference/forms/types/options/label.rst.inc

‎reference/forms/types/collection.rst

Copy file name to clipboardExpand all lines: reference/forms/types/collection.rst
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ photos).
2727
| options | - `empty_data`_ |
2828
| | - `error_bubbling`_ |
2929
| | - `error_mapping`_ |
30+
| | - `help`_ |
3031
| | - `label`_ |
3132
| | - `label_attr`_ |
3233
| | - `label_format`_ |
@@ -448,6 +449,8 @@ error_bubbling
448449

449450
.. include:: /reference/forms/types/options/error_mapping.rst.inc
450451

452+
.. include:: /reference/forms/types/options/help.rst.inc
453+
451454
.. include:: /reference/forms/types/options/label.rst.inc
452455

453456
.. include:: /reference/forms/types/options/label_attr.rst.inc

‎reference/forms/types/color.rst

Copy file name to clipboardExpand all lines: reference/forms/types/color.rst
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ element.
2222
| | - `empty_data`_ |
2323
| | - `error_bubbling`_ |
2424
| | - `error_mapping`_ |
25+
| | - `help`_ |
2526
| | - `label`_ |
2627
| | - `label_attr`_ |
2728
| | - `label_format`_ |
@@ -55,6 +56,8 @@ The default value is ``''`` (the empty string).
5556

5657
.. include:: /reference/forms/types/options/error_mapping.rst.inc
5758

59+
.. include:: /reference/forms/types/options/help.rst.inc
60+
5861
.. include:: /reference/forms/types/options/label.rst.inc
5962

6063
.. include:: /reference/forms/types/options/label_attr.rst.inc

‎reference/forms/types/country.rst

Copy file name to clipboardExpand all lines: reference/forms/types/country.rst
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ the option manually, but then you should just use the ``ChoiceType`` directly.
3838
| | - `data`_ |
3939
| | - `disabled`_ |
4040
| | - `empty_data`_ |
41+
| | - `help`_ |
4142
| | - `label`_ |
4243
| | - `label_attr`_ |
4344
| | - `label_format`_ |
@@ -100,6 +101,8 @@ The actual default value of this option depends on other field options:
100101
.. include:: /reference/forms/types/options/empty_data.rst.inc
101102
:start-after: DEFAULT_PLACEHOLDER
102103

104+
.. include:: /reference/forms/types/options/help.rst.inc
105+
103106
.. include:: /reference/forms/types/options/label.rst.inc
104107

105108
.. include:: /reference/forms/types/options/label_attr.rst.inc

‎reference/forms/types/currency.rst

Copy file name to clipboardExpand all lines: reference/forms/types/currency.rst
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ manually, but then you should just use the ``ChoiceType`` directly.
3030
| | - `data`_ |
3131
| | - `disabled`_ |
3232
| | - `empty_data`_ |
33+
| | - `help`_ |
3334
| | - `label`_ |
3435
| | - `label_attr`_ |
3536
| | - `label_format`_ |
@@ -89,6 +90,8 @@ The actual default value of this option depends on other field options:
8990
.. include:: /reference/forms/types/options/empty_data.rst.inc
9091
:start-after: DEFAULT_PLACEHOLDER
9192

93+
.. include:: /reference/forms/types/options/help.rst.inc
94+
9295
.. include:: /reference/forms/types/options/label.rst.inc
9396

9497
.. include:: /reference/forms/types/options/label_attr.rst.inc

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.