You are here: Home Plone products Products.PloneFormGen

Products.PloneFormGen (1.7.0)

by maria last modified 2011-11-29
Released on 2011-11-16 by Steve McMahon for Plone 3.3, Plone 4.0, Plone 4.1 under GPL - GNU General Public License available for All platforms.
Software development stage: stable
A generic Plone form generator using fields, widgets and validators from Archetypes. Actions like mailing or saving form input are incorporated by included plug-in adapters.

This product provides a generic Plone form generator using fields, widgets and validators from Archetypes. It makes it possible to build simple contact, information-gathering or data-entry forms through Plone's interface.

To use it, create a form folder, then add form fields as contents. Individual fields can display and validate themselves for testing purposes. The form folder creates a form from all the contained field content objects.

Final disposition of form input is handled via plug in action products. Action adapters included with this release include a mailer and a save-data adapter that saves input in tab-separated format for later download.

Since PloneFormGenerator uses Archetypes fields, widgets and validators, it's also a good tool for rapidly prototyping forms intended for use with Archetypes-derived content types.


Requires TALESField and TemplateFields from Jens W. Klein's ScriptableFields bundle.


Thanks to the efforts of Pierre-Yves Landuré and Sebastien Douche, the French translation is in excellent condition.

Stefano Saltannecchi <stefano.saltannecchi -at-> is coordinating an Italian translation.

A Czech translation has started, but is still in an early stage.

Rationale For This Product

  • Plone needs a general-purpose form generator that may be used for mail forms, RDBMS database interactions and other functions that don't require the Archetypes' persistence machinery.
  • Designing a form using such a form generator should not require a) work on the file system, b) creation of new content types, c) use of the ZMI (except for scripting field population or custom validation). [PloneFormMailer is an outstanding, useful product, that suffers only for its reliance on the ZMI/Formulator for design.]
  • Archetypes, in conjunction with the CMF Form Controller, has a form generator built-in. Ideally, it should be possible to repurpose the Archetypes widgets and validators (which were evidently intended to be generally useful) for a more general-purpose form generator.

How it Works

There is a Form Folder content type that's a container for field content types. Basically, you add a form folder, then add form field objects inside it. The form folder renders all the contained fields into a single form with the fields appearing in the same order as their position in the folder. When the form is submitted, the form folder validates all the submitted field data. In that sense, it's just like Formulator, but done via Plone content types rather than Zope types.

The field content types (e.g., string field, integer field, text field, selection field) can also render themselves, so that they may be individually tested.

Each field content type's schema has variables that control rendering of the field (like label, size, maxlength, default, options ...). TALESFields are used to allow for dynamic overrides.

Each field object, in addition to the fields that are part of it's schema, has a single archetype field that's not part of the schema and that is created on initialization. That's the field that's actually rendered for the view. The view method for the field renders (and validates) it. The view method for the form folder just sequentially renders (and validates) the special fields of its contained objects.

Document Actions
Powered by Plone