collective.z3cform.norobots
- Warning
- This product has not had a release in over 1 year and may no longer be maintained.
Human readable captcha for z3cform
Project Description
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
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
- I have the following error: "We already have: zope.schema 3.5.4 but z3c.form 2.4.1 requires 'zope.schema>=3.6.0'." => You should add this extra version restriction to your buildout: http://good-py.appspot.com/release/plone.app.z3cform/0.5.0
- I have the following error when launching the tests: "ImportError: No module named lxml.html" => In order to run the tests you need lxml. You can add for example "z3c.form [test]" to your buildout. See http://plone.293351.n2.nabble.com/Custom-Dexterity-Widgets-td5594532.html for more details.
Changelog
1.2.1 (2010-11-05)
- Added german translation [petschki]
1.2 (2010-10-31)
- Fix tests for Plone 4 [sylvainb]
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]
Current Release
collective.z3cform.norobots 1.2.1
Released Nov 05, 2010 — tested with Plone 4, Plone 3
Added german translation
More about this release…
-
Get
collective.z3cform.norobots
for
all platforms
- collective.z3cform.norobots-1.2.1.tar.gz
- If you are using Plone 3.2 or higher, you probably want to install this product with buildout. See our tutorial on installing add-on products with buildout for more information.
All Releases
| Version | Released | Description | Compatibility | Status |
|---|---|---|---|---|
| 1.2.1 | Nov 05, 2010 | Added german translation More about this release… |
Plone 4
Plone 3
|
final |
| 1.2 | Oct 31, 2010 | Fix tests for Plone 4. More about this release… |
Plone 4
Plone 3
|
final |
| 1.1 | Sep 15, 2010 | 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. More about this release… |
Plone 4
Plone 3
|
final |
| 1.0 | Jan 15, 2010 | More about this release… | final |


