[Product-Developers] how to hide widget's label?

Nathan Van Gheem vangheem at gmail.com
Tue Jan 27 15:28:20 UTC 2009


You could create your own new widget template and specify it in the widget
instance of the object.  That way you won't modify the original template.
After you create the widget template, you do something like this,

StringField('something',
         widget = StringWidget(
            macro="mytemplateforthiswidget"
         )
     )

Again, pretty sure that works but untested.

On Tue, Jan 27, 2009 at 9:17 AM, SimO <simahawk at gmail.com> wrote:

> Nathan Van Gheem wrote:
> > I think you can just set the field label to nothing,
> >
> > StringField('something',
> >>         widget = StringWidget(
> >>             description = "",
> >>             label=""
> >>         )
> >>     ),
>
> Well, actually is what I did :) but, I forgot to mention that when you
> do so you get a crapy ":" aside the field.
>
> That's the reason why the label - if possible - should be disabled.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20090127/efecdf07/attachment.html>


More information about the Product-Developers mailing list