i'm developing custom module, with quite large entity with lots of fields. i'm having trouble getting template preprocessing to work as expected.
the problem is that when ever i try to do any preprocessing on the form elements, the
<form> tag doesn't get printed.
for example, this works as expected:
in preprocess -function:
$variables['rest'] = drupal_render($variables['form']);
and in the template file:
but if try and extract form elements off from the form variable:
$variables['rest'] = drupal_render_children($variables['form']);
the form prints as expected, apart from the
i have the whole form wrapped like so, because of the ajax updates.
$form['#prefix'] = '<div id="order-form-wrap">';
$form['#suffix'] = '</div>';
and the theme is declared like so in module_theme() function:
'order_add' => array(
'render element' => 'form',
'template' => 'orders-form', // TemplateFileName.tpl.php
'path' => drupal_get_path('module', 'module_name'),
suppose that i'm missing something fundamental here, but just can't figure out what it is.