collective.fieldedit
A view to edit selected fields of a content type.
Features
Useable by simply calling a view with a the fields you want to edit as query-string-parameters
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
Nice to use in modals/popups fo allow editing one ore more fields (but not all)
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
Edit the text of a document:
http://localhost:8080/Plone/front-page/@@field_edit_form?fields=IRichTextBehavior.text
Edit the fields title and subjects:
http://localhost:8080/Plone/front-page/@@field_edit_form?fields=IDublinCore.subjects&fields=IDublinCore.title
Display the text and edit the publishing date:
http://localhost:8080/Plone/front-page/@@field_edit_form?fields=IRichTextBehavior.text:display:0&fields=IRelatedItems.relatedItems
Render a link to edit the title in a modal:
<a href="${python:context.absolute_url()}/field_edit_form?fields=IDublinCore.title"
class="pat-plone-modal"
data-pat-plone-modal='{"actionOptions": {"reloadWindowOnClose": false, "redirectOnResponse": true, "disableAjaxFormSubmit": true},
"buttons": ".formControls > button"'>
Edit the Title in a modal
</a>
Edit multiple fields:
<a href="${python:context.absolute_url()}/@@field_edit_form?fields=field1&fields=field2&fields=field3"
Edit some fields.
</a>
Display one field, edit another”
<a href="${python:context.absolute_url()}/@@field_edit_form?fields=field1:display&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&fields=field2"
Edit one field, display another.
</a>
Behavior-fields need to be prefixed with the Behavior:
<a href="${python:context.absolute_url()}/@@field_edit_form?fields=IBasic.title"
Edit one field, display another.
</a>
Supported Versions
collective.fieldedit is tested in Plone 5.1, 5.2 and 6.
Installation
Install collective.fieldedit by adding it to your buildout:
[buildout]
...
eggs =
collective.fieldedit
and then running bin/buildout
Then got to the add-on controlpanel (/prefs_install_products_form) to enable it.
Contribute
Issue Tracker: https://github.com/collective/collective.fieldedit/issues
Source Code: https://github.com/collective/collective.fieldedit
License
The project is licensed under the GPLv2.
Changelog
1.0 (2022-06-25)
Additional Markup for Plone 6.0 (Bootstrap 5) [jensens]
Formatted with Black/isort according to Plone standards. [jensens]
Add support for Python 3, Plone 5.2 and 6. [pbauer]
1.0a2 (2018-08-04)
Fix redirect and remaining webdav locks on cancel (#1) [pbauer]
1.0a1 (2017-10-10)
Initial release. [pbauer]
Metadata
Release files for collective.fieldedit 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| collective.fieldedit-1.0.tar.gz | 23.1 kB | Without provenance | Details for collective.fieldedit-1.0.tar.gz |
Release files / collective.fieldedit-1.0.tar.gz
| Download URL | collective.fieldedit-1.0.tar.gz |
|---|---|
| Size | 23.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53a2dbdf9f1e771c10bc598ad78d8a9acc4853ae34850c3d466943a6cd6432bd
|
|
BLAKE2b-256 checksum How to use checksums |
71de7f78ee1a77ab58aa56465a38147420beb6b4b7e08b20350e78316327a2ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.8.2 requests/2.27.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.9.11
|
Security for collective.fieldedit 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.