• MODX.com

    1,830 downloads

StupidQuestion

StupidQuestion is an extra by jako, first released on 2013-03-12.

Package Description

StupidQuestion is a simple but effective and userfriendly captcha solution for FormIt. A stupid question (i.e. 'What is the given name of Albert Einstein?') is inserted in the form template. The form field is filled and hidden by a javascript that is packed by a javascript packer. The packer scrambles the code and because of the input name contains different counts of hyphens the right answer is not placed at the same position in the javascript. The filling bots have to execute javascript - a lot don't do that.

GitHub Repositiory: https://github.com/Jako/StupidQuestion-revo

Usage/Installation Instructions

The snippet has to be used as FormIt preHook and hook.

[[!FormIt? &preHooks=`StupidQuestion,...` &hooks=`StupidQuestion,...` ...

with the following properties

  • stupidQuestionAnswers - Answers for the stupid question (JSON encoded array of 'forename name' combinations)
  • stupidQuestionLanguage - Language of the stupid question
  • stupidQuestionFormcode - Template chunk for the stupid question html form field
  • stupidQuestionScriptcode - Template chunk for the filling javascript
  • stupidQuestionRegister - Move the filling javascript to the end of the html body
  • stupidQuestionNoScript - Remove the filling javascript

If you want to change the answers look at the english lexicon setting as example:

["Charlie Chaplin", "Albert Einstein", "Mary Smith", "Whoopi Goldberg"]

All language specific strings could be changed by editing the lexicon entries in the stupidquestion namespace. Use the existing placeholders in these entries.

Don't forget to place the [[!+formit.stupidquestion_html]] placeholder in the form code.

Bases on a captcha idea of Peter Kröner: http://www.peterkroener.de/dumme-frage-captchas-automatisch-ausfuellen/

Details

Developer(s)
jako
Released
2013-03-12
First seen
2013-03-12
License
GPLv2
Supported databases
MySQL
Minimum MODX Requirement
2.2

StupidQuestion Releases

Vendor Signature Released on
MODX.com 0.7.2-pl 2013-03-12 (5 years ago)