Rev | Line | |
---|
[1959] | 1 | -------------------------- |
---|
| 2 | Captchas in a formlib form |
---|
| 3 | -------------------------- |
---|
| 4 | |
---|
| 5 | Using quintagroup.formlib.captcha in a formlib form is simple. Just add a |
---|
| 6 | Captcha field to your schema, and away you go: |
---|
| 7 | |
---|
| 8 | >>> from zope.interface import Interface |
---|
| 9 | >>> from quintagroup.formlib.captcha.form import Captcha |
---|
| 10 | >>> class CaptchaSchema(Interface): |
---|
| 11 | ... captcha = Captcha( |
---|
| 12 | ... title=_(u'Type the code'), |
---|
| 13 | ... description=_(u'Type the code from the picture shown below.')) |
---|
| 14 | |
---|
| 15 | and formlib will take care of the rest. The widget associated with this field |
---|
| 16 | will render the captcha and verify the use input automatically. |
---|
| 17 | |
---|
Note: See
TracBrowser
for help on using the repository browser.