#4: Make it easy to add new widgets
- Contents
Refactor, clarify APIs and provide examples to help widget authors integrate their widgets with PloneFormGen
- Proposed by
- Steve McMahon
- Proposal type
- Architecture
- Assigned to release
- State
- completed
Motivation
There are some excellent widgets outside the Archetypes collection. Some of these are naturals for inclusion in PloneFormGen's form fields. PFG may implement some of these itself, but ideally it should be easy for a widget author to add their widget to the PFG fields without touching PFG.
Proposal
All that should be necessary to add a widget to PFG fields is to implement the form field interface and add the new field content type to the form folder's allowed_content_types.
Interfaces
IPloneFormGenField must be complete enough to cover everything PFG needs to use and know. For example, it will need to convey whether a field is a label or a real input.
Cleanup
Any place PFG uses a hard-coded list of field types must be replaced with dynamic code.
Examples
Create one or more examples using widgets that are most likely to be of general use.

