On 2/17/06, Brett Haydon <[EMAIL PROTECTED]> wrote:
> I am just starting with zope 3.2 and am using the zope.formlib to generate a
> simple form. Where and how do I override the presentation aspect of
> the input field length in html.
> e.g. size="20"
> <div class="widget"><input class="textType" id="form.full_name"
> name="form.full_name" size="20" type="text" value="Brett Haydon"  /></div>

Perhaps the easiest way is to extend setUpWidgets():

class MyForm(zope.formlib.form.PageForm):

    form_fields = ...

    def setUpWidgets(self, ignore_request=False):
        super(MyForm, self).setUpWidgets(ignore_request=ignore_request)
        self.widgets['somefield'].displayWidth = 40


Fred L. Drake, Jr.    <fdrake at gmail.com>
"There is no wealth but life." --John Ruskin
Zope3-users mailing list

Reply via email to