agaskar.com

Nov 30 2007

SUBMIT HOOK isn’t called for my FORM!

This is possibly one of the more frustrating situations in Drupal. There’s a couple reasons this could happen:

1. You’re using a $_GET form. Sorry — drupal only looks at the $_POST. (I actually need to test to confirm this).
2. You themed the form and forgot to do a drupal_render($form) at the end of your theme function (i just did this… ARRRRRRRGHHHHHH!) This prevents several crucial variables from getting passed into the $_POST superglobal, so while the form will happily POST to the page, it will never call the submit hook, for no obvious reason.

Comments (View)
Page 1 of 1
blog comments powered by Disqus