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

Commit2c46963

Browse files
committed
Merge pull requestsymfony#3250 from bicpi/asterisk_alternative_for_required_form_fields
[Cookbook][Forms] Add Asterisk alternative using CSS
2 parents357f10b +2a53133 commit2c46963

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎cookbook/form/form_customization.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,17 @@ original template:
896896

897897
See:ref:`cookbook-form-theming-methods` for how to apply this customization.
898898

899+
..sidebar::Using CSS only
900+
901+
By default, ``label`` tags of required fields are rendered with a
902+
``required`` CSS class. Thus, you can also add an Asterisk using CSS only:
903+
904+
..code-block::css
905+
906+
label.required:before {
907+
content:"*";
908+
}
909+
899910
Adding "help" messages
900911
~~~~~~~~~~~~~~~~~~~~~~
901912

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp