[Product-Developers] Re: zope.formlib - field widths
Martin Aspeli
optilude+lists at gmail.com
Wed Jun 10 00:59:11 UTC 2009
Derek Broughton wrote:
> Derek Broughton wrote:
>
>> I must be blind, because I can't find a way to specify the HTML <INPUT>
>> field size. If I specify max_length for any of the various zope.schema
>> string fields, it seems to be used purely for validation, and no matter
>> what size I want the field to be, I get somewhere in the vicinity of 25
>> characters (the page is actually generated with SIZE=20).
>>
>> How can I make my text (actually schema.URI) fields 100 characters long?
>
> Ugh. It appears I have to set .custom_widget.
Or you can override updateWidgets(), IIRC, and modify the widget
property there, like self.widgets['foo'].size = 10 or whatever.
Martin
--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book
More information about the Product-Developers
mailing list