Skip to main content

Introduction

collective.z3cform.norobots provides a “human” captcha widget based on a list of questions/answers.

This captcha can be used as a plone.app.discussiom captcha plugin.

The widget is based on z3c.form.TextWidget.

Requirements

  • tested with Plone 4.0 as a plugin for plone.app.discussion, should work with Plone 3

  • plone.app.z3cform

Installation

Just a simple easy_install collective.z3cform.norobots is enough.

Alternatively, buildout users can install collective.z3cform.norobots as part of a specific project’s buildout, by having a buildout configuration such as:

[buildout]
...
eggs =
    collective.z3cform.norobots
...
[instance]
...
zcml =
    collective.z3cform.norobots

In portal_setup, apply the profile collective.z3cform.norobots:default.

Add a new question

In the Plone Property Sheet “norobots_properties” (portal_properties/norobots_properties), add a new property:

Name: The question id (ex: "question4")
Value: your_question::the_answer (ex: "What is 10 + 12 ?::22")
Type: string

Answer can contain multiple values delimited by semicolon:

Name: The question id (ex: "question8")
Value: your_question::the_answer;another_answer (ex: "What is 5 + 5 ?::10;ten")
Type: string

Usage

You can use this widget setting the “widgetFactory” property of a form field:

from zope import interface, schema
from z3c.form import interfaces, form, field, button, validator
from plone.app.z3cform.layout import wrap_form

from collective.z3cform.norobots.i18n import MessageFactory as _
from collective.z3cform.norobots.widget import NorobotsFieldWidget
from collective.z3cform.norobots.validator import NorobotsValidator

class INorobotsForm(interface.Interface):
    norobots = schema.TextLine(title=_(u'Are you a human ?'),
                               description=_(u'In order to avoid spam, please answer the question below.'),
                               required=True)

class NorobotsForm(form.Form):
    fields = field.Fields(INorobotsForm)
    fields['norobots'].widgetFactory = NorobotsFieldWidget

# wrap the form with plone.app.z3cform's Form wrapper
NorobotsFormView = wrap_form(NorobotsForm)

# Register Norobots validator for the correponding field in the IContactInfo interface
validator.WidgetValidatorDiscriminators(NorobotsValidator, field=INorobotsForm['norobots'])

for more information see contact_info.py in the plone_forms directory in the package.

Possible problems

Credits

makinacom

Changelog

1.3.1 (2012-03-28)

  • Add simplified chinese translation [Aijun Jian]

1.3 (2012-02-27)

  • Allow multiple answers for a question [naro]

  • Added danish translation [tmog]

1.2.1 (2010-11-05)

  • Added german translation [petschki]

1.2 (2010-10-31)

  • Fix tests for Plone 4 [sylvainb]

  • Added Czech translation [naro]

1.1 - 2010-09-15

  • Support for using as a plone.app.discussion captcha plugin (Plone 4) [Petri Savolainen]

  • Finnish translations [Petri Savolainen]

1.0

  • Initial release [sylvainb]

Metadata

Release files for collective.z3cform.norobots 1.3.1

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

Source distribution (sdist)

Source distribution for collective.z3cform.norobots 1.3.1
File Size Uploaded Provenance Actions
collective.z3cform.norobots-1.3.1.zip 39.9 kB Without provenance Details for collective.z3cform.norobots-1.3.1.zip

Release files / collective.z3cform.norobots-1.3.1.zip

Download URL collective.z3cform.norobots-1.3.1.zip
Size 39.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0a50fc1edf040b1e0c55c6e46f8a7e8d62bfc4bcb6ca143682b0c0bdedcc9f4c
BLAKE2b-256 checksum
How to use checksums
9f41bb30c6ce0fcb0598776f1d7d04e619e517a5035fc32308ff60f6bf9c6561
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for collective.z3cform.norobots 1.3.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.

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