tags:

views:

52

answers:

1

Please,

I can't use hooks in Drupal, because I don't know where to place them. I tried to place in template.php, unsuccessfull.

This is the hook which I want to use: http://api.drupal.org/api/function/hook_form_FORM_ID_alter/6

+4  A: 

You would call this hook from within a custom module. For example, let's say you wrote a custom module, named bookmark. That module would contain a file named, bookmark.module. From within bookmark.module, you would call bookmark_form_FORM_ID_alter($form, $formstate)

Mike Munroe
This answer is correct, but you may also want to take a look at the Drupal handbook tutorial on creating a module: http://drupal.org/node/206753
Decipher
Yes, I would agree, you probably want to take a look at that online tutorial that Decipher linked to. Another resource, if you are looking for something in print, is Pro Drupal Development, http://www.drupalbook.com/.
Mike Munroe
Thank you, I got it.I can do it ONLY if I write a custom module?
Ivan Rocha