Closed (works as designed)
Project:
Honeypot
Version:
7.x-1.15
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2013 at 22:53 UTC
Updated:
11 Oct 2013 at 18:19 UTC
Honeypot isn't protecting my Entity Registration module's registration forms. I tried a custom module (created a customized.info and customized.module), but it's not doing anything.
Am I doing something wrong?
<?php
function hook_form_registration_form_alter(&$form, &$form_state, $form_id) {
honeypot_add_form_protection($form, $form_state, array('honeypot', 'time_restriction'));
}
Comments
Comment #1
geerlingguy commentedIf the name of your custom module is 'customized', then the function should be like:
You can see the form id by going to the form itself, viewing the page source, and finding the "form_id" value in the source.
Comment #2
jessmiller commentedThanks geerlingguy. I changed the code in my custom module as suggested, cleared the cache, made sure my custom module is enabled, but honeypot still isn't showing up on the form (in chrome developer tools, i searched the html for "honey" with no results)
Comment #3
geerlingguy commentedAnother question - are you logged in as the site administrator? The admin automatically bypasses honeypot protection, so it won't show up at all. Additionally, if your user account has a role that bypasses honeypot protection (on the permissions page), then it wont' show up either.
Comment #4
jessmiller commentedYes! That's it. Logged out, and honeypot is right there in the source html. Thanks!
Comment #5
geerlingguy commentedGreat! I'm glad I could help :)