Skip to main content

An add-on for Plone

Project description

https://travis-ci.org/collective/collective.fieldedit.svg?branch=master https://coveralls.io/repos/github/collective/collective.fieldedit/badge.svg?branch=master

collective.fieldedit

A flexible form to edit selected fields of a content type.

Features

  • Nice to use in modals/popups fo allow editong one ore more fields (but not all)

  • Select the field or fields you want to edit

  • For each field you can choose between input, display and hidden.

  • Uses the same widgets and validators as the default edit-form

  • Respects schema-hints like field-permissions, invariants and widgets

Use it by adding a link to the view @@field_edit_form and pass the fiels you want to edit as a query-string with up to three parameters separated by a “:” for each field.

Examples

A link that opens the view to edit the title of this object in a modal:

<a href="${python:context.absolute_url()}/field_edit_form?fields=IBasic.title"
   class="pat-plone-modal"
   data-pat-plone-modal='{"actionOptions": {"reloadWindowOnClose": false, "redirectOnResponse": true},
                          "buttons": ".formControls > button",
                          "content": "#content-core"}'>
    Edit the Title in a modal
</a>

Edit multiple fields:

<a href="${python:context.absolute_url()}/@@field_edit_form?fields=field1&amp;fields=field2&amp;fields=field3"
    Edit some fields.
</a>

Display one field, edit another”

<a href="${python:context.absolute_url()}/@@field_edit_form?fields=field1:display&amp;fields=field2"
    Edit one field, display another.
</a>

Hide the label:

<a href="${python:context.absolute_url()}/@@field_edit_form?fields=field1::0"
    Edit one field, display another.
</a>

Add a hidden field:

<a href="${python:context.absolute_url()}/@@field_edit_form?fields=field1:hidden&amp;fields=field2"
    Edit one field, display another.
</a>

Behavior-fields need to be prefixed with the Bahavior:

<a href="${python:context.absolute_url()}/@@field_edit_form?fields=IBasic.title"
    Edit one field, display another.
</a>

Documentation

TODO

Installation

Install collective.fieldedit by adding it to your buildout:

[buildout]

...

eggs =
    collective.fieldedit

and then running bin/buildout

Contribute

License

The project is licensed under the GPLv2.

Contributors

Changelog

1.0a1 (2017-10-10)

  • Initial release. [pbauer]

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

collective.fieldedit-1.0a1.tar.gz (13.8 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