[support] Form submission problem

Jeff Greenberg listmail.ayendesigns at gmail.com
Fri Feb 1 15:33:15 UTC 2013


Nancy, can you put an error_log statement or some such in the file and another in the handler to verify whether they are (not) being loaded?

On Feb 1, 2013, at 9:23 AM, "Ms. Nancy Wichmann" <nan_wich at bellsouth.net> wrote:

> Thanks, Hans. That was a new one to me, as a lot of D7 stuff is. But it didn't solve the problem. Oh well.
>  
>  
> Nancy
> 
> From: Hans Langouche 
> I’m starting to believe that the problem is that the #submit handler is not wired correctly to  this form. If require_once  failed it would throw a hard error and no form would render.  This means that the function that the form handler thinks is the submit handler is not the same as the one you think it is. I think the include is not the problem or the form wouldn’t render.
>  
> Is it possible that something is overriding the submit handler.  #submit attributes on the form in drupal 7 might do that.
>  
> Are you using 6 or 7?
>  
> $form_state[‘rebuild’] sets in the validation handler might cause this.
> $form_state[‘storage’] sets in the validation handler in D6 might also cause this.
>  
> Dave
>  
> From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On Behalf Of Ms. Nancy Wichmann
> Sent: Thursday, January 31, 2013 4:49 PM
> To: support at drupal.org
> Subject: Re: [support] Form submission problem
>  
> 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 at users.sourceforge.net>
> To: support at 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/ ]
> 
> 
> --
> [ Drupal support list | http://lists.drupal.org/ ]
> 
> -- 
> [ Drupal support list | http://lists.drupal.org/ ]
> 
> -- 
> [ Drupal support list | http://lists.drupal.org/ ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20130201/f384a811/attachment.html 


More information about the support mailing list