Form Submit Handler not firing on Page Reload with GET parameters I have a simple form

function example_form($form, &amp;$form_state) {
  $form['#attributes']['method'] = 'get';
  $form['button'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; 'Submit',
  );
  $form['search'] = array(
    '#type' =&gt; 'textfield',
    '#required' =&gt; FALSE,
  );

  return $form;
}


and a submit handler

function example_form_submit($form, &amp;$form_state) {
  $form_state['rebuild'] = TRUE;
  drupal_set_message(t('Form Submitted'));
}


When I click the button, the form submits properly and the URL gets all the form parameters.

but when I reload the page with all those URL parameters, the example_form_submit() is not firing, how do I make my form submit/fire the submit hook when the URL is reloaded with GET parameters?
The correct way to change the method to be used by a form is to use the #method element rather than by setting the attribute, as otherwise the form API will still expect to be triggered by a POST.

https://api.drupal.org/api/drupal/developer%21topics%21forms_api_reference.html/7.x#method