Drupal 7: Theme hook for form not found Drupal doesn't call the theme function for my form in my module (error log: Theme hook wc_challenge_actions not found.). I found similar posts on stack exchange, but none of the solutions works for me.

Form declaration

    function wc_challenge_actions($form, &amp;$form_state, weACT_Challenge $challenge) {
      $form['action_groups']['#tree'] = TRUE;
      $form['action_groups']['#type'] = 'fieldset';
      $form['action_groups']['#title'] = t('Action groups');
      $form['action_groups']['#theme'] = 'wc_challenge_actions';

      // rest of form definition, works correctly

      return $form;
    }


Theme function

    function theme_wc_challenge_actions($variables) {
      drupal_set_message('The theme worked!');

      // rest
    }


Drupal never calls this function... Any ideas?
You have not defined your theme function in hook_theme

 function yourmodule_theme() {
   return array(
     'wc_challenge_actions' =&gt; array (
       'render element' =&gt; 'element',
     ),
   );
 }