I received a pretty strange problem trying to customize custom form's template. So while form's template stay untouched (drupal core's form template was used) validation works just fine, but when I add some specific templates to my theme, validation just not working at all. Submitting a form just doesn't gives anything - MYMODULEFORM_form_validate and MYMODULEFORM_form_submit hooks are not called after form been submitted.
function MYTHEME_theme () { $items['MYMODULEFORM_1_form'] = array( 'render element' => 'form', 'path' => drupal_get_path('theme', 'MYTHEME') . '/templates', 'template' => 'template_1_filename', ); $items['MYMODULEFORM_2_form'] = array( 'render element' => 'form', 'path' => drupal_get_path('theme', 'MYTHEME') . '/templates', 'template' => 'template_2_filename', ); $items['MYMODULEFORM_3_form'] = array( 'render element' => 'form', 'path' => drupal_get_path('theme', 'MYTHEME') . '/templates', 'template' => 'template_3_filename', ); return $items; } When I print out $form variable inside the template file #validate and #submit elements are present and correct. Do you have any ideas what can cause this problem I just stucked at this. Thank you!
print drupal_render_children($form);at the bottom of the template file?