Skip to main content

A PloneFormGen adapter that will save the data from a form to an actual content type. This way you can still use permissions, workflows, etc on the form data.

Project description

Introduction

uwosh.pfg.(d)ata(2)(c)ontent

This product provides a dynamic content type to store PloneFormGen form data into. It leverages schemaextenders ability to dynamically add extra fields on a content type so that you essentially get a persistent copy of your form.

The product adds a “Save Data to Content Adapter” item to the “Add new..” drop down for the PloneFormGen Form. Once enabled, when a user submits a form, a new content item is created with that data and located in the adapter.

Saving Content

Upon save data adapter creation, user can choose to use any content type that has ‘uwosh.pfg.d2c’ configured as the ‘product’ in the FTI, to store the form submission.

So besides the original FormSaveData2ContentEntry, its clone types can also be used to store form data - whether added to types tool via code, genericsetup profile or by manually copying the FormSaveData2ContentEntry FTI in portal_types tool (and then renaming it appropriately).

The type names can be translated simply by adding them to plone.po in the language-specific locale/LC_MESSAGES subdirectory.

Warning

Don’t forget to enable the adapter after it is added to the form!

Compatibility

Compatible with versions of PloneFormGen >= 1.2.2 and Plone 3.x -> 4.0.

Version 1.0 derives the new D2C saved data adapter from the BTree folder class. This allows Plone 3.x sites to handle larger numbers of content items inside the D2C objects. There is an upgrade step that allows pre-1.0 D2C objects to get migrated to BTree storage. Version 1.0 also works with Plone 4. However, if you have a Plone 3.x site that uses pre-1.0 D2C and you upgrade to Plone 4 and only then upgrade to 1.0+ D2C, the upgrade step that migrates D2C storage to BTree storage may not work. We recommend that you first upgrade to 1.0+ D2C then upgrade to Plone 4.

Changelog

1.2 - 2011-02-20

  • New feature: dynamic data entry title override via a TALES expression configurable in the save data adapter.

1.1.1 - 2011-02-11

  • fix translations [saffe]

1.1 - 2011-02-10

  • New feature: Any FTI clone of FormSaveData2ContentEntry type can be selected in the save adapter as the data content entry type to use. This makes it possible to apply different workflows, content rules etc. to content saved by different forms. [saffe]

1.0 - 2011-01-06

  • New saved data adapter derives from large (BTree) folder instead of regular ones to handle better large numbers of contained items. Upgrade step migrates from obsolete normal/slow folder storage to the new BTree storage. [nguyen]

  • fixed issue where it couldn’t render the title viewlet if a lines field was used for the title field. Convert all value fields to string for the title. [vangheem]

0.8 (2010-10-30)

  • add support for pfg datagridfield [vangheem]

0.7 (2010-08-04)

  • added accessor method getValue for entry type.

  • index object properly after values are set

  • allow you to specify which field to use for the title

0.6 (2010-07-31)

  • added autoinclude entry point

  • only use _finishConstruction method if it’s available since in newer versions of CMFCore, it’s not there.

0.5

  • use id for Title

  • allow avoiding security checks when creating content.

  • conditionally include certain fields for backwards compatibility

  • make backward compatible to at least PloneFormGen 1.2.2 – maybe older.

  • added tests

  • added permissions for adding content

  • More fixes for the rating scale field. Should work as expected now.

0.4

  • fixed widgets not working correctly.

  • memoize the call to get the fields just in case it gets slow

0.3 (2010-07-27)

  • fix the way I checked for FileFields so that anything that subclasses a FileField won’t try to get it’s form value differently anymore.

0.2 (2010-07-27)

  • fix egg distro not including docs folder so the product wouldn’t install

  • fixed file fields not saving

0.1 (2010-07-27)

  • initial release

Contributors

Nathan Van Gheem, Author T. Kim Nguyen, Lurker Petri Savolainen, Contributor

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uwosh.pfg.d2c-1.2.zip (40.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page