[development] Forms API

Earl Miles merlin at logrus.com
Wed Mar 18 04:15:15 UTC 2009


Gordon Messmer wrote:
> I'm trying to write a new module, and having some trouble with the forms 
> API.  I'm deploying this under Drupal 5.  I've been reading the 
> tutorials and documentation for the forms API.  A lot of this module is 
> cut and paste from the documentation.
> 
> I'm able to generate a form properly, and even theme it.  It displays 
> properly in my browser.  However, when I submit the form, the _submit 
> function isn't called.  The code is here:
> 
> http://phantom.dragonsdawn.net/~gordon/customerportal.module
> 
> The browser sends the form data via POST, and the web server responds 
> with "200 OK", sending back the form HTML.  It doesn't log any errors. I 
> have no idea how to go about debugging Drupal to determine why the 
> _submit function isn't being called.  Can anyone give me some pointers?

You don't have a drupal_render($form) at the end which gets all the 
hidden fields that are necessary, like the form id and form token.


More information about the development mailing list