Skip to main content

This package protects the default contact form of Plone which is generally accessible via /contact-form. It provides a checkbox in the controlpanel to disable it globally and adds a (H/Re)captcha field depending on your installation.

Project description

https://github.com/collective/collective.contactformprotection/actions/workflows/meta.yml/badge.svg

collective.contactformprotection

This package protects the default contact form of Plone which is generally accessible via /contact-info. If you have installed this product, you can go to the Contacformprotection Control Panel and adjust its settings.

Settings

  • Provide a checkbox in the controlpanel to disable the form globally

  • Add a H/Recaptcha/Norobots field depending on the installed 3rd party addon plone.formwidget.[h|re]captcha or collective.z3cform.norobots.

Captcha support

If you have installed plone.formwidget.recaptcha, plone.formwidget.hcaptcha or collective.z3cform.norobots it is automatically added to the form. In case both are installed, you can make a choice in the controlpanel.

You can install the packages by adding the extra_required to this package:

[buildout]
...
eggs =
    collective.contactformprotection[hcaptcha,recaptcha,norobots]

The settings mentioned above are all set in the configuration registry. See plone.app.registry how to set these values TTW or in a package profile.

Installation

Install collective.contactformprotection by adding it to your buildout:

[buildout]

...

eggs =
    collective.contactformprotection

and then running bin/buildout

Customizing Captcha vocabulary

The captcha settings is provided by a zope vocabulary with enhanced term objects:

class CaptchaVocabItem(object):
    def __init__(self, token, value, widget=None, validator_view=""):
        self.token = token
        self.value = value
        self.widget = widget
        self.validator_view = validator_view

If you have additional captcha addons or want to override the provided widget and validator view, you can override the vocabulary utility contactformprotection.captchavocabulary with your terms.

Authors

Peter Mathis, petschki

Contribute

License

The project is licensed under the GPLv3.

Contributors

2.0.0 (2026-05-19)

Breaking changes:

  • Replace pkg_resources namespace with PEP 420 native namespace. (#3928)

New features:

  • Add support for Plone 6.1, 6.2, and related Pythons. Drop support for Python 3.8 and 3.9. [maurits]

Changelog

1.1.0 (2025-05-26)

  • Implement collective.z3cform.norobots support. @petschki

1.0.0 (2024-04-29)

  • Initial release. [petschki]

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_contactformprotection-2.0.0.tar.gz (30.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file collective_contactformprotection-2.0.0.tar.gz.

File metadata

File hashes

Hashes for collective_contactformprotection-2.0.0.tar.gz
Algorithm Hash digest
SHA256 80e6ef748fc6643473db0edaa09c1355793c8ef9bd44eb9688016d3eaf23f68f
MD5 a76a65da805cf56e332501240035b2ec
BLAKE2b-256 3b561b2a528b449317050b881dcfbecea35dfe22863803b6c021962578eb885f

See more details on using hashes here.

File details

Details for the file collective_contactformprotection-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for collective_contactformprotection-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74608707a1759d4423dd6ec7fa6c742fbbf30625a67cb395e7fe628f8e5596ff
MD5 201341c641ec3e4eab1b4612ec9f1bb5
BLAKE2b-256 ed86e95a67f62fb65937e16613bdabb9bdb6f9d654717c8292c312cbea348fb5

See more details on using hashes here.

Supported by

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