On 5/2/07, Hermann Himmelbauer <[EMAIL PROTECTED]> wrote:
Moreover I wonder if it's possible to customize the attributes "size"
and "maxlength" of HTML input fields via the zope schema. Schemas offer the
attribute "max_length", however this does not affect the rendered HTML - size
seems to be always set to "20", maxlength is never set.

maxlength is used to control the maximum length of the input, IIRC.
If you're using the standard Text widget, you can control this by
setting the displayMaxWidth attribute on the widget object.

The visual width (the size attribute in the HTML) is controlled using
the displayWidth attribute of the widget object.

With zope.formlib, these can be set in the setUpWidgets() method; be
sure to call the base setUpWidgets() first, then get the widget
objects from self.widgets.


Fred L. Drake, Jr.    <fdrake at gmail.com>
"Chaos is the score upon which reality is written." --Henry Miller
Zope3-users mailing list

Reply via email to