[Zope-dev] Re: Setting the size of a zope.formlib's schema html input

Christian Zagrodnick cz at gocept.com
Mon Apr 7 02:13:32 EDT 2008


On 2008-04-07 03:41:34 +0200, "Marcelo de Moraes Serpa" 
<celoserpa at gmail.com> said:

> 
> 
> Hello,
> 
> This might sound lik a stupid question, but I couldn't find any simple
> solution or answer for this anywhere else, so hopefully someone in this list
> knows the answer.
> 
> I'm using zope.formlib to generate a simple contact form. It is simple and
> effective. But the framework complicates for simple things such as setting
> the size of a textfield. I don't want all the textfields to be of the same
> size - I want that, depending on the field, the size of the html input will
> vary. And that's exactly what I couldn't do as of yet. Does anyone know how
> could I set the size of a textfield?
> 
> Take this as example:
> 
> Telefone = schema.TextLine(title=_(u"Telefone para Contato"),
>                               required=True)
> 
> Is there an attribute like size or something?

No, use CSS for layout. :)

You could also use a custom widget which has a different size, but CSS 
might be the more correct separation.

Regards,
-- 
Christian Zagrodnick

gocept gmbh & co. kg  ·  forsterstrasse 29 · 06112 halle/saale
www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891





More information about the Zope-Dev mailing list