[development] Forms API Question - Node with table
like poll.module
Karoly Negyesi
karoly at negyesi.net
Sat Nov 12 12:57:36 UTC 2005
On Sat, 12 Nov 2005 12:42:46 +0100, Simon Lindsay <simon at dirtbike.ws>
wrote:
> Karoly Negyesi wrote:
>> form['entries']['#theme'] = 'mymodule_foo';
>> function theme_mymodule_foo($form) {
>> }
>> For examples, I'd grep on element_children (though there are quite a
>> few forms that got updated before element_children was born).
>
> OK, but the timesheet module is an extension of node.module, and you're
> supposed to "return $form;" at the end of the "function
> timesheet_form(&$node)", not "return
> drupal_get_form('timesheet_entries', $form);".
Yes. Return $form and it'll call theme_mymodule_foo with the array in
$form['entries']
Regards
NK
More information about the development
mailing list