Thank you all for the replies!

I wouldn't like to use CSS since I would like a "self-contained" form - all
the data necessary to built the form would be in the schema. I think that
the size of the text inputs, though being presentational in nature, in this
case are **very** specific to the form and vary depending on the semantics
of the fields, so, I don't think moving this data to a CSS would be the best

Could someone show me an example of defining a widget to set the size of the
rendered input?


On Mon, Apr 7, 2008 at 8:10 AM, Jim Fulton <[EMAIL PROTECTED]> wrote:

> On Apr 6, 2008, at 9:41 PM, Marcelo de Moraes Serpa wrote:
> > 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?
> >
> Someone (you?) asked this in IRC.
> Schema's (and schema fields) are for specification, not presentation.
> (Yes, the title and description are used for presentation by default.)
> If you want to provide finer control over presentation, provide custom
> widget in the form field definition. (It might be nice if zope.formlib.Field
> provided the ability to provide widget data without having to specify the
> widget.)
> Jim
> --
> Jim Fulton
> Zope Corporation
Zope-Dev maillist  -
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to