Mercurial > p > roundup > code
changeset 8098:c6030fa9362e
docs: issue2550961 - required attribute incorrectly shown when using field()
Document how to use field(required=None) so input has just the
bareword required rather than required=X in the tag.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 17 Jul 2024 00:31:04 -0400 |
| parents | 7ac637506acf |
| children | 98ad6d786bef |
| files | doc/reference.txt |
| diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/reference.txt Tue Jul 16 22:39:45 2024 -0400 +++ b/doc/reference.txt Wed Jul 17 00:31:04 2024 -0400 @@ -2986,6 +2986,20 @@ labelfirst (Boolean properties only) place the labels before the radio buttons + Other arguments are added as properties directly on the + input tag. For example:: + + field(size=30, id='myid', required=None) + + produces:: + + <input id="myid" size="30" required> + + Note that using ``None`` as the value results in an + attribute without a value. This is useful for boolean + properties like ``required``. + + rst only on String properties - render the value of the property as ReStructuredText (requires the :ref:`Docutils module to be installed separately<install/docutils>`).
