the hook should pass on form_values and the options.

The idea is that I can then count the number of forms that a user opens and can deny submission later if I think there are too many of them.

Comments

geerlingguy’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Assigned: Unassigned » geerlingguy
Status: Active » Needs review

Applying to 7.x first. What do you think of these additional hooks?

I would add hook_honeypot_form_protections_alter() and hook_honeypot_add_form_protection(). Documentation can be found in honeypot.api.php.

geerlingguy’s picture

StatusFileSize
new3.18 KB

Forgot to attach patch...

geerlingguy’s picture

#2: 1778296-2-honeypot-hooks.patch queued for re-testing.

geerlingguy’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Needs review » Patch (to be ported)

Added hooks in 7.x: http://drupalcode.org/project/honeypot.git/commit/91d921f

Moving to 6.x. Will try to do a quick/straight port of the patch here.

geerlingguy’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new3.15 KB
geerlingguy’s picture

Status: Needs review » Reviewed & tested by the community

Marking for commit in my next batch of fixes.

geerlingguy’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.