Function
zope.app.form.utility.setUpWidgets

Signature

setUpWidgets(view, schema, viewType, prefix=None, ignoreStickyValues=False, initial={}, names=None, context=None)

Documentation String

Sets up widgets for the fields defined by a schema.

Appropriate for collecting input without a current object implementing the schema (such as an add form).

view is the view that will be configured with widgets.

viewType is the type of widgets to create (e.g. IInputWidget or IDisplayWidget).

schema is an interface containing the fields that widgets will be created for.

prefix is a string that is prepended to the widget names in the generated HTML. This can be used to differentiate widgets for different schemas.

ignoreStickyValues is a flag that, when True, will cause widget sticky values to be replaced with the context field value or a value specified in initial.

initial is a mapping of field names to initial values.

names is an optional iterable that provides an ordered list of field names to use. If names is None, the list of fields will be defined by the schema.

context provides an alternative context for acquisition.