Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to add spamicide module to my custom defined register page. I enabled it for that site in settings. Now i have code like that:
<div class="field">
<?php
print drupal_render($form['spamicide']); // print the spamicide field
?>
</div>
However that field is empty, i don't know what i'm doing wrong. I died the same thign for captcha module and it works fine. Any ideas? Btw form has field spamicide, that is what i get if i var_dump it:
array (size=10)
'#element_validate' =>
array (size=1)
0 => string 'spamicide_validate' (length=18)
'#post' =>
array (size=0)
empty
'#programmed' => boolean false
'#tree' => boolean false
'#parents' =>
array (size=1)
0 => string 'spamicide' (length=9)
'#array_parents' =>
array (size=1)
0 => string 'spamicide' (length=9)
'#weight' => float 0.01
'#processed' => boolean false
'#defaults_loaded' => boolean true
'#sorted' => boolean true
Comments
Comment #1
gabrjan CreditAttribution: gabrjan commentedBtw. If i use normal registration page i can see that field, that shouldn't happen either i guess... I fixed that with modifiying css, but i steel dont know how to add it to custom page...
Comment #2
lipcpro CreditAttribution: lipcpro commentedIn the spamicide interface, if you enable "Add Spamicide administration links to forms" then navigating to your custom page ( I think you mean form) you should see a link to "add spamicide protection to this form" or something along those lines, simply enable it for that form, and your done. If you don't see that option, please let me know.
Comment #3
markie CreditAttribution: markie commentedI have a custom user register form that is being pummeled and needed to add this feature to it. I can't go to that page because of access. I ended up putting the form_id directly into the table and that worked. Wish there was a way to add it via the admin page.
Comment #4
lamp5