Introduction
Select2 integration for Plone and z3c.form
Example:
from zope import schema
from zope.interface import Interface
from .field import Select2MultiField
from .field import Select2Field
class ISchema(Interface):
users = Select2MultiField(
title=u"Users",
value_type=schema.Choice(
title=u"User ID",
source="plone.app.vocabularies.Users"
),
search_view=lambda x: '{}/select2-users-search'.format(x),
required=True
)
user = Select2Field(
title=u"Single User",
source="plone.app.vocabularies.Users",
search_view=lambda x: '{}/select2-users-search'.format(x),
placeholder="Search and select a user",
required=True
)
categories = Select2MultiField(
title=u"Categories",
value_type=schema.TextLine(
title=u"Category"
),
search_view=lambda x: '{}/select2-subjects-search'.format(x),
required=False
)
Contributors
Giorgio Borelli [gborelli], Original Author
Changelog
1.1 (2014-06-04)
Fixed z3c.form meta.zcml include [gborelli]
Restricted demo view to Manager role [gborelli]
Add placeholder attribute on single and multiple selection widgets [jslucas]
1.0b (2014-05-14)
Register categories and users search views to INavigationRoot [gborelli]
Add specific fields for single and multiple selection widgets [gborelli]
Improved IUserTokenInputWidget and UserSearch view [gborelli]
Package created using templer [gborelli]
Metadata
Release files for collective.select2 1.1
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.select2-1.1.zip | 52.7 kB | Without provenance | Details for collective.select2-1.1.zip |
Release files / collective.select2-1.1.zip
| Download URL | collective.select2-1.1.zip |
|---|---|
| Size | 52.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dda87f0581a377cdbb256911096e88810ff728bc6aee0e349233b540e0413191
|
|
BLAKE2b-256 checksum How to use checksums |
69ef0e6fb58f27edcfb2b45a87970459ad55bcd8800979e6b0e0520657492504
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for collective.select2 1.1
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.