The documentation and the source for the TextWidget class both promise a
"wrap" attribute, which does the obvious thing in the rendered HTML. They
lie, however. It kind of looks like nobody quite got around to
implementing it. So I finished the job...
jon
--- form/widget.py.0.51 2002-11-18 14:23:11.000000000 -0700
+++ form/widget.py 2002-11-18 14:23:58.000000000 -0700
@@ -167,15 +167,18 @@
widget_type = "text"
def __init__ (self, name, value=None,
- cols=None, rows=None):
+ cols=None, rows=None,
+ wrap=None):
Widget.__init__(self, name, value)
self.cols = cols
self.rows = rows
+ self.wrap = wrap
def render (self, request):
return (render_tag("textarea", name=self.name,
cols=self.cols,
- rows=self.rows) +
+ rows=self.rows,
+ wrap=self.wrap) +
html_quote(self.value, "") +
"")