<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>plone.autoform</name>
<description>==============
plone.autoform
==============

This package provides tools to construct z3c.form forms out of hints stored
in tagged values on schema interfaces. A special form base class is used to
set up the 'fields' and 'groups' properties on form instances. It also
contains a 'display form' implementation that is compatible with Zope 2
page templates, and with some convenience features for rendering widgets in
view mode.

The tagged values are stored under a various keys. These can be found in
the plone.autoform.interfaces module. They support:

 - changing a field to 'display' or 'hidden' mode
 - omitting fields
 - re-ordering fields relative to one another
 - placing fields into fieldsets (groups)
 - changing the widget of a field
 - displaying a field conditionally based on a permission

There are several ways to set the form data:

 - Manually, by using setTaggedValue() on an interface.
 - By loading the schema from a plone.supermodel XML file and using the 
   form: prefix
 - By using the grok directives in the plone.directives.form package.

To use the automatic form setup, mix in the following base class in your
forms:

    &gt;&gt;&gt; from plone.autoform.form import AutoExtensibleForm

and then provide the 'schema' (a schema interface) and optionally the
'additionalSchemata' (a list of schema interfaces) attributes on your form:

    &gt;&gt;&gt; class MyForm(AutoExtensibleForm, form.EditForm):
    ...     schema = IMySchema
    ...     additionalSchemata = (ISchemaOne, ISchemaTwo,)
    ...     
    ...     # ...

For dynamic forms, you could of course make 'schema' and 'additionalSchemata' 
into properties.

To use the display form, create a view like:

    &gt;&gt;&gt; from plone.autoform.view import WidgetsView
    &gt;&gt;&gt; class MyView(WidgetsView):
    ...     schema = IMySchema
    ...     additionalSchemata = (ISchemaOne, ISchemaTwo,)
    ...     
    ...     #

To render the form, do not override __call__(). Instead, either implement
the render() method or set an 'index' attribute to a page template or other
callable.

See autoform.txt for details on how to use the form generation, view.txt for
details on the widgets view, and supermodel.txt for information on the
'form' XML namespace in a plone.supermodel schema file.


Changelog
=========

1.0b2 - 2009-07-12
------------------

* Changed API methods and arguments to mixedCase to be more consistent with
  the rest of Zope. This is a non-backwards-compatible change. Our profuse
  apologies, but it's now or never. :-/

  If you find that you get import errors or unknown keyword arguments in your
  code, please change names from foo_bar too fooBar, e.g. process_fields()
  becomes processFields().
  
  Note in particular that the additional_schemata property is now called 
  additionalSchemata. If you have implemented this property yourself, you will
  need to rename it!
  [optilude]

1.0b1 - 2009-04-17
------------------

* Initial release</description>
<homepage rdf:resource="http://code.google.com/p/dexterity" />
<maintainer><foaf:Person><foaf:name>Martin Aspeli</foaf:name>
<foaf:mbox_sha1sum>e9d69205eabc8d3443d474f8c6a26446c2541eb9</foaf:mbox_sha1sum></foaf:Person></maintainer>
<release><Version><revision>1.0b2</revision></Version></release>
</Project></rdf:RDF>