<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City" /><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place" /><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName" /><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]--><style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Bookman Old Style";
        panose-1:2 5 6 4 5 5 5 2 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="blue">
<div class="Section1">
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">If you&#8217;re willing to post your form and form_submit handler code, I&#8217;d be willing to take a look at it (or contact my via drupal contact
 form). <o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><br>
Again, if what you say is true (the form is rendering but the submit handler is not executing and they are in the same file). I think we can safely assume your include file is in fact being loaded. Any tweaks to that are futile.
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">By the way, if the hook_nood_view is in the same module as the form&#8217;s include file, using
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">require_once &#8216;mymodule.pages.inc&#8217; ; &nbsp;&nbsp;<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">Is quite adequate.&nbsp; Using all the drupal get path and stuff is only necessary if you are loading code from a different module.
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p>&nbsp;</o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">Dave<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p>&nbsp;</o:p></span></font></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">
<hr size="2" width="100%" align="center" tabindex="-1">
</span></font></div>
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="font-size:10.0pt;
font-family:Tahoma;font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma"> support-bounces@drupal.org [mailto:support-bounces@drupal.org]
<b><span style="font-weight:bold">On Behalf Of </span></b><st1:PersonName w:st="on">Ms. Nancy Wichmann</st1:PersonName><br>
<b><span style="font-weight:bold">Sent:</span></b> Friday, February 01, 2013 6:24 AM<br>
<b><span style="font-weight:bold">To:</span></b> <st1:PersonName w:st="on">support@drupal.org</st1:PersonName><br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [support] Form submission problem</span></font><o:p></o:p></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p>&nbsp;</o:p></span></font></p>
<div>
<p class="MsoNormal" style="background:white"><font size="3" color="black" face="Arial"><span style="font-size:12.0pt;font-family:Arial;color:black">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.<o:p></o:p></span></font></p>
<div>
<p class="MsoNormal" style="background:white"><font size="3" color="black" face="Arial"><span style="font-size:12.0pt;font-family:Arial;color:black">&nbsp;<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><font size="3" color="black" face="Arial"><span style="font-size:12.0pt;font-family:Arial;color:black">&nbsp;<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><st1:City w:st="on"><st1:place w:st="on"><b><i><font size="4" color="#ff007f" face="Bookman Old Style"><span style="font-size:13.5pt;font-family:&quot;Bookman Old Style&quot;;color:#FF007F;
  font-weight:bold;font-style:italic">Nancy</span></font></i></b></st1:place></st1:City><font color="black" face="Arial"><span style="font-family:Arial;color:black"><o:p></o:p></span></font></p>
</div>
<div>
<blockquote style="border:none;border-left:solid #1010FF 1.5pt;padding:0in 0in 0in 4.0pt;
margin-left:3.75pt;margin-top:3.75pt;margin-bottom:5.0pt">
<p class="MsoNormal"><i><font size="4" color="#ff007f" face="Bookman Old Style"><span style="font-size:13.5pt;font-family:&quot;Bookman Old Style&quot;;color:#FF007F;
font-style:italic"><o:p>&nbsp;</o:p></span></font></i></p>
<div>
<div>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><i><font size="2" color="#ff007f" face="Arial"><span style="font-size:10.0pt;font-family:Arial;
color:#FF007F;font-style:italic">
<hr size="1" width="100%" align="center">
</span></font></i></div>
<p class="MsoNormal"><b><i><font size="2" color="#ff007f" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:#FF007F;font-weight:bold;
font-style:italic">From:</span></font></i></b><i><font size="2" color="#ff007f" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:#FF007F;
font-style:italic">
 Hans Langouche</span></font></i><i><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy;
font-style:italic">
</span></font><font color="#ff007f"><span style="color:
#FF007F"><o:p></o:p></span></font></i></p>
</div>
<div id="yiv1081541570">
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div>
<p class="MsoNormal"><i><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy;font-style:italic">I&#8217;m starting to believe that the problem is that the #submit handler is not wired correctly to &nbsp;this form. If require_once&nbsp;
 failed it would throw a hard error and no form would render.&nbsp; 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&#8217;t render.
</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
<div>
<p class="MsoNormal"><i><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy;font-style:italic">&nbsp;</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
<div>
<p class="MsoNormal"><i><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy;font-style:italic">Is it possible that something is overriding the submit handler.&nbsp; #submit attributes on the form in drupal 7 might
 do that. </span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
<div>
<p class="MsoNormal"><i><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy;font-style:italic">&nbsp;</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
<div>
<p class="MsoNormal"><i><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy;font-style:italic">Are you using 6 or 7?
</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
<div>
<p class="MsoNormal"><i><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy;font-style:italic">&nbsp;</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
<div>
<p class="MsoNormal"><i><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy;font-style:italic">$form_state[&#8216;rebuild&#8217;] sets in the validation handler might cause this.
</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
<div>
<p class="MsoNormal"><i><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy;font-style:italic">$form_state[&#8216;storage&#8217;] sets in the validation handler in D6 might also cause this.
</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
<div>
<p class="MsoNormal"><i><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy;font-style:italic">&nbsp;</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
<div>
<p class="MsoNormal"><i><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy;font-style:italic">Dave</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
<div>
<p class="MsoNormal"><i><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy;font-style:italic">&nbsp;</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><i><font size="3" color="#ff007f" face="Times New Roman"><span style="font-size:12.0pt;
color:#FF007F;font-style:italic">
<hr size="2" width="100%" align="center">
</span></font></i></div>
<div>
<p class="MsoNormal"><b><i><font size="2" color="#ff007f" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma;color:#FF007F;font-weight:bold;
font-style:italic">From:</span></font></i></b><i><font size="2" color="#ff007f" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma;color:#FF007F;
font-style:italic">
<a href="mailto:support-bounces@drupal.org" target="_blank" ymailto="mailto:support-bounces@drupal.org">
support-bounces@drupal.org</a> [mailto:<a href="mailto:support-bounces@drupal.org" target="_blank" ymailto="mailto:support-bounces@drupal.org">support-bounces@drupal.org</a>]
<b><span style="font-weight:bold">On Behalf Of </span></b><st1:PersonName w:st="on">Ms. Nancy Wichmann</st1:PersonName><br>
<b><span style="font-weight:bold">Sent:</span></b> Thursday, January 31, 2013 4:49 PM<br>
<b><span style="font-weight:bold">To:</span></b> <a href="mailto:support@drupal.org" target="_blank" ymailto="mailto:support@drupal.org">
support@drupal.org</a><br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [support] Form submission problem</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
</div>
<div>
<p class="MsoNormal"><i><font size="3" color="#ff007f" face="Times New Roman"><span style="font-size:12.0pt;color:#FF007F;font-style:italic">&nbsp;<o:p></o:p></span></font></i></p>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="background:white"><i><font size="3" color="black" face="Arial"><span style="font-size:12.0pt;font-family:Arial;color:black;
font-style:italic">In hook_node_view(), I have:</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><i><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
color:black;font-style:italic">&nbsp; require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'mymodule')
 . '/</span></font></i><i><font color="black" face="Courier New"><span style="font-family:&quot;Courier New&quot;;
color:black;font-style:italic">mymodule.pages.inc';<br>
&nbsp; $form = drupal_get_form('mymodule_tab_form', $node, $mymodule-&gt;wid, $states, $current);<br>
&nbsp; $form['#weight'] = 99;<br>
<br>
&nbsp; $node-&gt;content['mymodule'] = $form;</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><i><font size="3" color="black" face="Arial"><span style="font-size:12.0pt;font-family:Arial;color:black;font-style:italic">I'm guessing that this technically makes the form part of the main module, while the submission handler is still
 in the .inc file.</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><i><font size="3" color="black" face="Arial"><span style="font-size:12.0pt;font-family:Arial;color:black;font-style:italic">&nbsp;</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><i><font size="3" color="black" face="Arial"><span style="font-size:12.0pt;font-family:Arial;color:black;
font-style:italic">BTW, I even tried adding the .inc file name to the .info file. No help.</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><i><font size="3" color="#ff007f" face="Times New Roman"><span style="font-size:12.0pt;color:#FF007F;font-style:
italic"><o:p>&nbsp;</o:p></span></font></i></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="background:white"><i><font size="3" color="black" face="Arial"><span style="font-size:12.0pt;font-family:Arial;color:black;
font-style:italic">&nbsp;</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="background:white"><st1:City w:st="on"><st1:place w:st="on"><b><i><font size="4" color="#ff007f" face="Bookman Old Style"><span style="font-size:13.5pt;font-family:&quot;Bookman Old Style&quot;;color:#FF007F;
  font-weight:bold;font-style:italic">Nancy</span></font></i></b></st1:place></st1:City><i><font color="black" face="Arial"><span style="font-family:Arial;color:black;font-style:
italic">
</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="background:white"><i><font size="3" color="black" face="Arial"><span style="font-size:12.0pt;font-family:Arial;color:black;
font-style:italic">Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt;background:white"><i><font size="3" color="#ff007f" face="Times New Roman"><span style="font-size:12.0pt;
color:#FF007F;font-style:italic"><o:p>&nbsp;</o:p></span></font></i></p>
</div>
<div>
<div>
<div>
<div class="MsoNormal" align="center" style="text-align:center;background:white">
<i><font size="2" color="black" face="Arial"><span style="font-size:10.0pt;font-family:Arial;
color:black;font-style:italic">
<hr size="1" width="100%" align="center">
</span></font></i></div>
<div>
<p class="MsoNormal" style="background:white"><b><i><font size="2" color="black" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:black;
font-weight:bold;font-style:italic">From:</span></font></i></b><i><font size="2" color="black" face="Arial"><span style="font-size:10.0pt;font-family:Arial;
color:black;font-style:italic">
 Earnie Boyd &lt;<a href="mailto:earnie@users.sourceforge.net" target="_blank" ymailto="mailto:earnie@users.sourceforge.net">earnie@users.sourceforge.net</a>&gt;<br>
<b><span style="font-weight:bold">To:</span></b> <a href="mailto:support@drupal.org" target="_blank" ymailto="mailto:support@drupal.org">
support@drupal.org</a> <br>
<b><span style="font-weight:bold">Sent:</span></b> Thursday, January 31, 2013 1:35 PM<br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [support] Form submission problem</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
</div>
<div style="margin-bottom:12.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt;background:white"><i><font size="3" color="black" face="Times New Roman"><span style="font-size:12.0pt;
color:black;font-style:italic"><br>
On Thu, Jan 31, 2013 at 12:27 PM, <st1:PersonName w:st="on">Ms. Nancy Wichmann</st1:PersonName> wrote:<br>
&gt; In a module, I am using drupal_get_form() to load a form from a .inc file.<br>
&gt; That works fine. But when it is submitted, the submission handler can't be<br>
&gt; found; it's also in the .inc file. How do I get around this?<br>
<br>
Uh, I thought that was how it should be done.&nbsp; Can you give us a mock<br>
up of your form and menu item?<br>
<br>
-- <br>
Earnie<br>
-- <a href="https://sites.google.com/site/earnieboyd" target="_blank">https://sites.google.com/site/earnieboyd</a><br>
-- <br>
[ Drupal support list | http://lists.drupal.org/ ]</span></font><font color="#ff007f"><span style="color:#FF007F"><o:p></o:p></span></font></i></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><i><font size="3" color="#ff007f" face="Times New Roman"><span style="font-size:12.0pt;color:#FF007F;font-style:italic"><br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<o:p></o:p></span></font></i></p>
</blockquote>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><i><font size="3" color="#ff007f" face="Times New Roman"><span style="font-size:12.0pt;color:#FF007F;font-style:
italic"><br>
-- <br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<o:p></o:p></span></font></i></p>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</body>
</html>