Submit form when field value changed I have a simple form with method GET as follow...

function MYMODULE_form($form, &amp;$form_state) {
  $form['#method'] = 'get';
  $params = drupal_get_query_parameters();
  $form['cat'] = array(
    '#type' =&gt; 'select',
    '#title' =&gt; t('Categories'),
    '#options' =&gt; $categories,
    '#default_value' =&gt; isset($params['cat']) ? $params['cat'] : '',
  );
  $form['submit'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; t('Submit'),
  );
}


GET actuly bypasses the default submit and validation functions, which is ok for me.
I want to submit this form without submit button, when value in 'Categories' field is changed.

function MYMODULE_form($form, &amp;$form_state) {
  $form['#method'] = 'get';
  $params = drupal_get_query_parameters();
  $form['cat'] = array(
    '#type' =&gt; 'select',
    '#title' =&gt; t('Categories'),
    '#options' =&gt; $categories,
    '#default_value' =&gt; isset($params['cat']) ? $params['cat'] : '',
    '#ajax' =&gt; array(
      'callback' =&gt; 'MYMODULE_form_submit',
    ),
  );
}


How should I do this?
Here is how I was able to do this using attributes...

'#attributes' =&gt; array('onchange' =&gt; 'this.form.submit();'),


So it was just simple ....

function MYMODULE_form($form, &amp;$form_state) {
  $form['#method'] = 'get';
  $params = drupal_get_query_parameters();
  $form['cat'] = array(
    '#type' =&gt; 'select',
    '#title' =&gt; t('Categories'),
    '#options' =&gt; $categories,
    '#default_value' =&gt; isset($params['cat']) ? $params['cat'] : '',
    '#attributes' =&gt; array('onchange' =&gt; 'this.form.submit();'),
  );
}


Now I am able to submit form when field is changed.