diff --git a/cookbook/form/form_customization.rst b/cookbook/form/form_customization.rst index b3f35a15a8e..d9d1ba82889 100644 --- a/cookbook/form/form_customization.rst +++ b/cookbook/form/form_customization.rst @@ -896,6 +896,17 @@ original template: See :ref:`cookbook-form-theming-methods` for how to apply this customization. +.. sidebar:: Using CSS only + + By default, ``label`` tags of required fields are rendered with a + ``required`` CSS class. Thus, you can also add an Asterisk using CSS only: + + .. code-block:: css + + label.required:before { + content: "* "; + } + Adding "help" messages ~~~~~~~~~~~~~~~~~~~~~~