By mysocom on
here is my code:
ffunction my_module_my_form($form_state) {
$form['description'] = array(
'#type' => 'item',
'#value' => t('Enter your cridentials:'),
);
$form['first'] = array(
'#type' => 'textfield',
'#title' => t('First name'),
);
$form['middle'] = array(
'#type' => 'textfield',
'#title' => t('Middle name'),
);
$form['last'] = array(
'#type' => 'textfield',
'#title' => t('Last name'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}
theme_my_module_my_form($form)
{
$output=drupal_render($form["description"]);
$output.='<table class="my_module_form">';
$output.='<tr><td>'.drupal_render($form["first"]).'</td><td>'.drupal_render($form["middle"]).'</td><td>'.drupal_render($form["last"]).'</td></tr>';
$output.='<tr><td>'.drupal_render($form["submit"]).'</td></tr>';
$output.='</table>';
$output.=drupal_render($form);
return $output;
}
I don't understand. But theme_my_module_my_form() doen't work in drupal6!