Hello,
I'm wondering if there is an existing way to set a single word attribute
(for lack of a better description) in an htmltag. My specific need for this
is in the form2 package, I'd like to set a CheckboxWidget as "disabled"
(under certain circumstances).
details on the disabled input control available here:
http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.12
an example in html:
If nothing exists, I think it should be a simple change. I've tried the
following in html.py which seems to work, but I'm not sure if there are
cases that this would break something:
***************
*** 80,87 ****
val = attr
if val is not None:
r.append(' %s="%s"' % (attr, _escape_string(str(val))))
- else:
- r.append(' %s' % (attr) )
if xml_end:
r.append(" />")
else:
--- 80,85 ----
Thanks in advance,
-Charles.