In hook_node_view(), I have:
  require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'mymodule') . '/mymodule.pages.inc';
  $form = drupal_get_form('
mymodule_tab_form', $node, $mymodule->wid, $states, $current);
  $form['#weight'] = 99;

  $node->content['
mymodule'] = $form;
I'm guessing that this technically makes the form part of the main module, while the submission handler is still in the .inc file.

BTW, I even tried adding the .inc file name to the .info file. No help.

 
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.


From: Earnie Boyd <earnie@users.sourceforge.net>
To: support@drupal.org
Sent: Thursday, January 31, 2013 1:35 PM
Subject: Re: [support] Form submission problem

On Thu, Jan 31, 2013 at 12:27 PM, Ms. Nancy Wichmann wrote:
> In a module, I am using drupal_get_form() to load a form from a .inc file.
> That works fine. But when it is submitted, the submission handler can't be
> found; it's also in the .inc file. How do I get around this?

Uh, I thought that was how it should be done.  Can you give us a mock
up of your form and menu item?

--
Earnie
-- https://sites.google.com/site/earnieboyd
--
[ Drupal support list | http://lists.drupal.org/ ]