I am developing a form. 2 functions are:
function reserve_multi_step_form($form, &$form_state)
{
$module_path = drupal_get_path('module', 'reserve');
$form['#theme'] = 'reserve_form_2';
$form["agreed"] = array(
'#type' => 'checkbox',
'#title' => t("I accept the deposit policy"),
'#attributes' => array("onChange" => "policy_accepted();"),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
'#attributes' => array('style' => "padding: 0 10px;"),
"#disabled" => true,
);
return $form;
}
function reserve_multi_step_form_submit($form, &$form_state) {
print 1111;exit;
}
The theme function:
function reserve_theme($existing, $type, $theme, $path){
return array(
'reserve_form_2' => array(
'render element' => 'form',
'template' => 'reserve_form_2',
'path' => drupal_get_path('module', 'reserve'),
),
}
In the template file I print some text and render the form:
<?php
print "text";
print drupal_render_children($variables["form"]);
The form is displayed correctly. But after I click submit button, the reserve_multi_step_form_submit is not called. Without theming it works. What can be an issue?