<br><br><div class="gmail_quote">On Wed, Jul 9, 2008 at 9:22 PM, Syscrusher <<a href="mailto:syscrusher@4th.com">syscrusher@4th.com</a>> 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'Pry wrote:<br>
> Did you add the #theme function to hook_theme? #theme should work the<br>
> same. I don't believe there were any changes to how it is handled in<br>
> drupal_render.<br>
<br>
</div>Thanks for the quick reply, but now I'm confused. With regard to<br>
registering my theme function, no, I didn'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't imply that it should be called?<br>
<br>
I went to the hook_theme documentation, but I'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'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 theme() with the $element.<br><br><br>