Is there a way to submit a form on an element's #ajax? given a form like this:

function awesome_form() {

 $form['select'] = array(
     '#type' =&gt; 'select'
     '#options' =&gt; array(
        'hello' =&gt; t('Hello'),
        'good-bye' =&gt; t('Good Bye'),
     ),
     '#ajax' =&gt; array(
        'callback' =&gt; 'awesome_ajax',
        'progress' =&gt; FALSE,
     ),
 );

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

 return $form;

}


I want the ajax callback on the select box to fire a submission.
So for instance, when someone selects "Hello" the form submits and when someone selects "Good Bye" the form submits.
Right now (with the code above), awesome_ajax() fires like it's supposed to, but I can't seem to get the form to submit (save the data in the database).

Also, I would like it if there wasn't a visible submit button on the page (as the submit button is unnecessary).

How would I do this?

thanks!
You've not mentioned what your ajax callback is doing internal to it, but if all you want is to submit the form upon a change, you can do something like this in jQuery with no drupal involvement:

$('#edit-submit').hide();
$("#edit-field-FIELDNAME-0-value").live('change', function() {
  $('#edit-submit').click();
});


where #edit-submit is the id= in the form html of the submit input button and #edit-field-FIELDNAME-0-value is the id= of your select that you want the form submited upon change.  Throw this and the appropriate drupal behavior wrapper into a js file and you can drupal_add_js() it from your form hook.

ADDITION:

I suppose $('#form-id').submit(); is better than $('#edit-submit').click(); above where #form-id is the id= of your form.

Also, if you are running D6, you'll need the jQuery Update module installed.