Form submission handler is not executed In a module, I am using the following code. 

function mysimple_form($form, &amp;$form_state) {
  $form['#method'] = 'get';
  $form['#action'] = '/buy/{_val_}';
  $form['search_location'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; 'Search',
    '#default_value' =&gt; t('kathmandu'),
    '#size' =&gt; 60,
    '#maxlength' =&gt; 128,
    '#required' =&gt; TRUE,
    '#attributes' =&gt; array(
      'placeholder' =&gt; t('Search')
    )
  );

  $form['submit'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; t('Search'),
  );

  $form['#submit'][] = 'mysimple_form_submit';
  return $form;
}

function mysimple_form_submit($form, &amp;$form_state) {
  krumo('asdsads');
  die();
}


I am using that form in hook_node_view().

function mymodule_node_view($node, $view_mode, $langcode) {
  $form = drupal_get_form('mysimple_form');
  $node-&gt;content['simpleform'] = array(
    '#weight' =&gt; -1,
    '#markup'=&gt; drupal_render($form)
  );
}


The form is displayed perfectly, but the callback function doesn't seem to work.
I also tried $form['actions']['#submit][] = 'mysimple_form_submit'; and  $form['actions']['submit']['#submit][] = 'mysimple_form_submit'; but the form submission handler is still not invoked.
There is two problems:


You form method is GET so form submit action will be the actual path with the params like node/10?search_location=kathmandu&amp;op=Search&amp;form_build_id=form-s4JrAE91au_BWakeBLD7RUsktRTBXFCpJQrnHGiOjg8&amp;form_token=ES2W0RDpLOnWZUsXOnP4f9gBmSXcYLvqhO9uy1ee4Vk&amp;form_id=d7_exp_form  
The second one you set your action to '/buy/{_val_}' so automatically after the submit you will redirect to /buy/{_val_} without invoke the submit handler.


Suggestion:


If you want to invoke the submit handler remove the $form['#method'] and $form['#action'], so your form will be with post method and your submit handler will invoked.
Remove only $form['#method'] and create menu entry /buy/% and you can do your submit handler logic in the /buy/% callback function.