After a lot of searching I found out that submit callbacks can only be attached to both forms and form fields of the type 'button', and not to other form elements. I think it is wise to mention this in the API documentation of hook_elements. Now it tells us simply that #submit can be used, while actually it can only be used if the form element is a button.
Comments
Comment #1
jhodgdonNot only that, but only the #submit handler for the button that is clicked to submit the form will actually be executed, not all possible #submit functions.
This should be mentioned in the Drupal 6 hook_elements() doc and the Drupal 7 hook_element_info() doc
http://api.drupal.org/api/function/hook_elements/6
http://api.drupal.org/api/function/hook_element_info/7
Comment #2
jhodgdonWe have another issue about this:
#1230700: Documentation for hook_element_info() is very outdated, talks only about Form API, does not document #theme, #theme_wrappers