I know this is quite old, but I'm quite new to Yii and I was wondering if you could help me solve this.
I tried to implement this behavior on a basic (and recent, v1.1.14) Yii installation, and added it to the standard ContactForm as is (obviously changing the path) however it failed with the following error:
Event "ContactForm.onBeforeSave" is not defined.
The error goes away by adding replacing BeforeSave with onBeforeSave and then AfterSave with onAfterSave (as that was the next error coming up) in AiiAntiSpamBehavior, however I don't think it's doing anything.
Also, could you please clarify the intended usage of the field in emptyFieldsConfig? Is this supposed to be an existing field that's going to be hidden by this extension or am I supposed to make up a field name that the behavior will then create dynamically? I tried it with an existing field, but after doing the above changes, my email field was still present (was not hidden).
Additionally submitTimeConfig also has a field, and the comment says "field where error message should be displayed", so I'm guessing that would have to be a different field than the above, one that's actually not hidden, am I correct?
Thanks in advance!