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

Commit94df07b

Browse files
committed
Merge branch '5.2' into 5.3
* 5.2: Adding label_html for asterisk
2 parents9ab06d8 +54f6618 commit94df07b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

‎form/bootstrap4.rst‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ is a strong connection between the error and its ``<input>``, as required by the
8888
``form_label()`` internally. If you call to ``form_errors()`` in your template,
8989
you'll get the error messages displayed *twice*.
9090

91+
..tip::
92+
93+
Since form errors are rendered *inside* the ``<label>``, you cannot use CSS
94+
``:after`` to append an asterisk to the label, because it would be displayed
95+
after the error message. Use the:ref:`label<reference-form-option-label>`
96+
or:ref:`label_html<reference-form-option-label-html>` options instead.
97+
9198
Checkboxes and Radios
9299
---------------------
93100

‎reference/forms/types/form.rst‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,12 @@ of the form type tree (i.e. it cannot be used as a form type on its own).
179179

180180
..include::/reference/forms/types/options/disabled.rst.inc
181181

182+
.. _reference-form-option-label:
183+
182184
..include::/reference/forms/types/options/label.rst.inc
183185

186+
.. _reference-form-option-label-html:
187+
184188
..include::/reference/forms/types/options/label_html.rst.inc
185189

186190
..include::/reference/forms/types/options/row_attr.rst.inc

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp