19 Dec
2007
19 Dec
'07
1:55 a.m.
On Dec 18, 2007, at 4:45 PM, Feijó Legendas wrote:
Every site about hook_form, uses node! Can I do that without nodes?
Yes. hook_form() is specific to modules that implement their own node types. You don't want that. What you want is to read the documentation about the Forms API (FAPI) and define your own form builder function, validation routine, submit handler, etc. Then, you can just use hook_menu() to serve up this form at a specific menu location. http://api.drupal.org is your friend. Also, just search in core for hook_menu implementations that use "drupal_get_form" as the menu callback, and you'll find dozens (hundreds?) of examples. Good luck, -Derek (dww)