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

Marcelo, here's what I did:


class PromosEditForm(EditForm):
    """An edit form to modify promo selection fields."""
    form_fields = form.FormFields(IContentPromoFields)

    def setUpWidgets(self, ignore_request=False):
        self.adapters = {
            IContentPromoFields:ContentPromoFieldsAdapter(self.context)
            }
        self.widgets = form.setUpEditWidgets(
            self.form_fields, self.prefix, self.context, self.request,
            adapters=self.adapters, ignore_request=ignore_request
            )
        self.label = "..."
self.description = """\

        ...
        """
        self.widgets['global_promos'].size  = 5
        etc...


I too would like to see an example of a full custom widget. For example I'd like to use an AT InOut-style dual list widget.

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to