<div>I&#39;ve never heard of THEME_form_hook_alter().</div><div><br></div>template.php is generally for theme override functions. That is, the functions in this file will be overriding the output of existing theme functions which are defined by hook_theme.<div>
<br></div><div>Drupal themes only serve to rewrite existing output. All original output in Drupal is defined by theme functions, which appear modules. The stark theme is a nice working example of this -- notice that there are no included templates. Markup starts with modules.</div>
<div><br></div><div>In your case, you have only defined the override, not the originating theme function. So, in your module, you need to so something like the following: <a href="http://pastebin.com/vkXbxeX7">http://pastebin.com/vkXbxeX7</a></div>
<div><div><br></div><div><div>This will require a cache clear such that the theme registry will now know about hook_theme().</div><div><br></div><font color="#333333">Carl Wiedemann</font><div><div><font color="#333333">Website design and development consulting</font></div>
<div><font color="#333333"><a href="mailto:carl.wiedemann@gmail.com" target="_blank">carl.wiedemann@gmail.com</a> | skype: c4rlww</font></div></div><br>
<br><br><div class="gmail_quote">On Mon, Oct 10, 2011 at 11:34 PM, sebastian <span dir="ltr">&lt;<a href="mailto:inforazor@gmail.com">inforazor@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br>
<br>
Very sorry to ask this, but I am going in a loop with the documentation,<br>
and the IRC chat isn&#39;t helping much either... so I hope this won&#39;t take<br>
much of your time.<br>
<br>
I understand in D7 that we can write in a custom module for form<br>
alterations such as:<br>
<br>
file: webadmin_ui.module<br>
//this is a custom module I made<br>
<br>
function webadmin_ui_form_page_node_form_alter(&amp;$form, &amp;$form_state,<br>
$form_id) {<br>
        dpm ($form);//see values<br>
        //change values as you please here...<br>
}<br>
<br>
And I also understand that in D7 we REMOVED the feature/function to<br>
alter the form values in the THEME layer, so this function was killed:<br>
<br>
THEME_form_hook_alter($form) {}<br>
<br>
Because supposedly I can theme it via different methods.<br>
<br>
In the $form variable, when I DPM it [see above] I note the theme-chain:<br>
<br>
dpm($form) outputs: [among other things]<br>
<br>
$form[&#39;#theme&#39;][&#39;page_node_form&#39;]<br>
$form[&#39;#theme&#39;][&#39;node_form&#39;]<br>
<br>
If I try and be &quot;smart&quot; and write in my template.php:<br>
<br>
mytheme_page_node_form($form) {<br>
  dpm(&quot;it works!&quot;);<br>
}<br>
<br>
I clearly get nothing as this function is never called.<br>
<br>
Can I add my own function call to this list? If so, how?<br>
<br>
Is there documentation on this anywhere?<br>
<br>
The documentation in D6 was a mess, and for this in D7 its really no<br>
better [maybe even worse cause I keep hitting D6 pages mixed into D7<br>
ones with no warning].<br>
<br>
The whole point of all this is I want to understand how I can not only<br>
modify the form BEFORE it gets rendered, but also alter HOW the form is<br>
rendered... wrap some parts in a DIV, maybe add a missing CLASS or ID etc.<br>
<br>
Ideas?<br>
<br>
Thank you kindly,<br>
<br>
Sebastian.<br>
<font color="#888888">--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</font></blockquote></div><br></div></div>