diff options
| author | Amar <100243770+aadeina@users.noreply.github.com> | 2026-02-08 20:46:54 +0000 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2026-03-19 12:39:44 -0400 |
| commit | abf1df0e7aa10a02b838a0a974dba716af0719a5 (patch) | |
| tree | c5aea027c11e37fbd3d51b0e7413fe542097ee41 | |
| parent | 3d930a9f57f553228a9bec22e64bc183f802e461 (diff) | |
[6.0.x] Fixed #36904 -- Clarified how to hide form field labels in docs.
Backport of 8401071c52d19a2bdd987a2dbe79c440f01dfae9 from main.
| -rw-r--r-- | docs/ref/forms/fields.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 6108932d58..f7253e586f 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -112,8 +112,9 @@ field. This is used when the ``Field`` is displayed in a ``Form``. As explained in :ref:`ref-forms-api-outputting-html`, the default label for a ``Field`` is generated from the field name by converting all underscores to -spaces and upper-casing the first letter. Specify ``label`` if that default -behavior doesn't result in an adequate label. +spaces and upper-casing the first letter. Specify a string for ``label`` if +that default behavior doesn't result in an adequate label. Use an empty string +(``""``) to hide the label. Here's a full example ``Form`` that implements ``label`` for two of its fields. We've specified ``auto_id=False`` to simplify the output: |
