Skip to main content

Products.PFGMasterSelect

An add-on field for PloneFormGen using the MasterSelect widget.

Features

Installation

How to use

Please note that PloneFormGen’s QuickEdit mode does not work (yet) for this add-on.

After installing this product you can create the Master Select and Master Multiselect fields via the “Add new…” menu in a PloneFormGen form. Both fields allow you to specify a default value and the options available as the common selection field does.

Additionally it provides a configuration table that contains the MasterSelect configuration (see also MasterSelectWidget documentation for more detail):

name (required)

The target field’s name

action (required)

The action to be applied on the target field. The options are * show/enable: Show/Enable the target field only if toggle_method evaluates to True or the field’s value is in hide_value * hide/disable: Hide/disable the target field if toggle_method evaluates to True or the field’s value is in hide_values * value: Set the target field’s value to the result of the vocab_method * vocabulary: Set the target field’s vocabulary to the result of the vocab_method

vocab_method

A python expression evaluating to a single value or collection. The currently set value (MasterSelect) or values (MasterMultiSelect) are available via value and values respectively. Example: Set the vocabulary of a selection field using ['xyz' + v for v in values]

toggle_method

A python expression evaluating to a boolean value. This method takes precedence to hide_values. The currently set value (MasterSelect) or values (MasterMultiSelect) are available via value and values respectively. Example: Hide a field if the selected value has length 5 or equals foo using len(value) == 5 or value == 'foo'

hide_values

The values that show/hide/enable/disable operate on Example: Hide a field if the selected value is a or b using a,b

Change history

Changelog

0.2 (2017-05-19)

  • Fix bug related to Datagridfield providing empty rows

  • Fix type confusion after roundtrip by forcing every value to type string

  • Use plain string comparison for hide_values instead of python expressions evaluating to a value or a collection

  • Refine the slave fields widget descriptions regarding the method fields

  • Replace eval by Plone’s tales expressions

  • Add documentation

0.1 (2017-03)

  • Proof of concept

Contributors

“”, Author

Download

Metadata

Release files for Products.PFGMasterSelect 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Products.PFGMasterSelect 0.2
File Size Uploaded Provenance Actions
Products.PFGMasterSelect-0.2.tar.gz 13.9 kB Without provenance Details for Products.PFGMasterSelect-0.2.tar.gz

Release files / Products.PFGMasterSelect-0.2.tar.gz

Download URL Products.PFGMasterSelect-0.2.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ab6042afd28426cddd3a99297c24e4330d42b12023292f779f33465077aed8ec
BLAKE2b-256 checksum
How to use checksums
2c6d5f145b32a14ae7f1ddde01fd33ce6e3bdb86401a7ef00990f54bc949c553
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for Products.PFGMasterSelect 0.2

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.

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page