From 8401071c52d19a2bdd987a2dbe79c440f01dfae9 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: Fixed #36904 -- Clarified how to hide form field labels in docs. --- docs/ref/forms/fields.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs/ref/forms') diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 8309f5d38b..73faa8cc18 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