From abf1df0e7aa10a02b838a0a974dba716af0719a5 Mon Sep 17 00:00:00 2001 From: Amar <100243770+aadeina@users.noreply.github.com> Date: Sun, 8 Feb 2026 20:46:54 +0000 Subject: [6.0.x] Fixed #36904 -- Clarified how to hide form field labels in docs. Backport of 8401071c52d19a2bdd987a2dbe79c440f01dfae9 from main. --- docs/ref/forms/fields.txt | 5 +++-- 1 file 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: -- cgit v1.3