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

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-1.1.0.tar.gz (29.5 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for collective_contactformprotection-1.1.0.tar.gz
Algorithm Hash digest
SHA256 ecb6237803f4ad523d37443b6cb8d2e76477d627e24ac816ac3f2839076ba83d
MD5 66e504c27fda5514636eaa3d2a238cb3
BLAKE2b-256 7c57add49ebe024e47f0e84d1c22ec73ab9fd23630f529904a34aa62ceae862b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for collective_contactformprotection-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e2d7e886e8516a3a4809fafec1f0ff4164fc79b13cbb84be7a51ebdc15e9846
MD5 cffe1fcc3ca6f648b9b026c48f8a2cf3
BLAKE2b-256 c530cfbf860518915b721a0726de829a01c321f8019a368ccf792ae4717e53b5

See more details on using hashes here.

Supported by

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