Why can't i get simple form theming to work? I've got this implementation of hook_theme in a theme :

function uncoated_theme($existing, $type, $theme, $path) {

  return array(
    'uncoated_user_register_form' =&gt; array(
      'render element' =&gt; 'element',
    ),
  );

}


Furthermore, I've got the following function:

function uncoated_form_user_register_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  $form['#theme'] = array('uncoated_user_register_form');
}

function theme_uncoated_user_register_form($element) {
  return '&lt;div class="test"&gt;&lt;/div&gt;";
}


However, the function theme_uncoated_user_register_form is never invoked. I've also tried to replace $form['#theme'] with $form['#theme_wrapper'] to see if I could at least wrap the form in additional markup; but that does not work either.

I can't really see what I'm doing wrong? Drupal seems to be totally ignoring the theme function I'm trying to run the form through.
I think it's the simplest of things...

$form['#theme'] needs to be a string, not an array, so change

$form['#theme'] = array('uncoated_user_register_form');


to

$form['#theme'] = 'uncoated_user_register_form';