<br><br><div class="gmail_quote">On Wed, Jul 9, 2008 at 9:22 PM, Syscrusher &lt;<a href="mailto:syscrusher@4th.com">syscrusher@4th.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Wed, 2008-07-09 at 19:48 -0400, Darrel O&#39;Pry wrote:<br>
&gt; Did you add the #theme function to hook_theme? #theme should work the<br>
&gt; same. I don&#39;t believe there were any changes to how it is handled in<br>
&gt; drupal_render.<br>
<br>
</div>Thanks for the quick reply, but now I&#39;m confused. With regard to<br>
registering my theme function, no, I didn&#39;t realize I needed to do that.<br>
Is this necessary for the FAPI to call a theme function that is<br>
referenced in the $form array? IOW, just declaring the function in the<br>
$form array doesn&#39;t imply that it should be called?<br>
<br>
I went to the hook_theme documentation, but I&#39;m unclear on how those<br>
registration parameters apply to FAPI clients; the documentation seems<br>
to speak from the viewpoint of the theme writer. I&#39;m not writing a<br>
theme, just needing to wrap form elements into a table from the<br>
drupal_render() call. I embed class and ID attributes in the table which<br>
the theme can modify for aesthetics -- IOW, my module only applies the<br>
document structure elements without regard to their cosmetics at display<br>
time.<br>
<br>
Am I taking the wrong approach to this?<br>
</blockquote></div><br>FAPI and the theme layer are not the same... A theme function must be declared in hook_theme() in order for theme() to call it. FAPI simply calls&nbsp; theme() with the $element.<br><br><br>