Form submit handler not working I'm developing a pretty basic module catalog_request that creates a form. I'm replacing the form's default submit button &lt;input ..type="submit" /&gt; with a &lt;button ...&gt;click&lt;/button&gt; using following in form definition.  

function catalog_request_form($form, &amp;$form_state) {

    /**
     * form fields here
     */

    $form['fieldset_submit']['the_submit_button'] = array(
       '#type' =&gt; 'markup',
       '#prefix' =&gt; '&lt;button class="btn submit"&gt;',
       '#markup' =&gt; 'Send Request...',
       '#suffix' =&gt; '&lt;/button&gt;',
    );

    /* ... */
}


and have defined other two form related functions  

function catalog_request_form_validate($form, &amp;$form_state) {
    drupal_set_message(t('The form was validated'));
}

function catalog_request_form_submit($form, &amp;$form_state) {
    die('submitted');
    //drupal_set_message(t('The form was submitted'));
}


The problem  

My submit function catalog_request_form_submit isn't being called. I've read numerous articles online but none resolved my issue. Following didn't work  


Adding '#submit' =&gt; 'catalog_request_form_submit', to
the_submit_button key
Adding '$form['#submit'] =&gt; 'catalog_request_form_submit'; to end
of catalog_request_form function
Adding '$form['#submit'][] =&gt; 'catalog_request_form_submit'; to
end of catalog_request_form function


I've read that adding something along the lines of $form['actions']['#submit'][] = 'custom_function'; could solve the problem but I'm not sure how to adapt it for my form.    

I know that having '#type' =&gt; 'submit' for the submit button makes the form work but I want a button tag.

My problem is exactly When altering the submit button, the form does not work but it doesn't have a solution (only an answer that ignores the question's point)

P.S. I do not develop for drupal frequently so I might be missing something very obvious.

Any help will be greatly appreciated. thanks
In order to add another submit handler you have to add something to hook_form_alter(): check for your particular form ID, and then add a submit handler in one of the following ways:

OPTION 1:

To add a submit handler that is called as the next callback after processing the default submit handler callback you can use this:

function mymodule_form_alter(&amp;$form, &amp;$form_state) {
  if ($form_id == 'form-id-of-your-form') {
    $form['actions']['submit']['#submit'][] = 'mymodule_whatever_function';
  }
}


OPTION 2:

If OPTION 1 is not working for you, replace the third line with this:

form['#submit'][1] = 'mymodule_whatever_function';


This will add a second submit handler, or replace the second one with yours if there is already more than one.

OPTION 3:

To remove the default submit handler completely (so that "nothing will happen" on submit, or so that you can replace it with your own), use code like this:

function mymodule_form_alter(&amp;$form, &amp;$form_state) {
  if ($form_id == 'form-id-of-your-form') {
    unset($form["actions"]['submit']);
  }
}