Form theme function is not invoked for a block content Have a custom module with a block. Added form and form theme functions. Using hook_theme() to register  form theme function.

Trying to put form content in the _block_view() function into block content. 
But finaly it doesn't use form theme function - theme_mymodule_custom_form()

The form is displayed on a block, but theme function is not in use,
Have no idea how to make this work. 
Found a good sample here http://www.jaypan.com/comment/1758, but it didn't help me.

 function mymodule_block_view($delta = '') {
  switch($delta){
    case 'mymodule':
      if(user_access('access content')){
        $block['subject'] = 'Block header'; 
        $block['content'] = drupal_get_form('mymodule_custom_form');
      }
    return $block;
  }
 }

function mymodule_theme()
{
    return array
    (
        'mymodule_custom_form' =&gt; array
        (
            'render element' =&gt; 'form'
        ),
    );
}


/**
*  Create a form
*/
function mymodule_custom_form($form, $form_state) {
  // Form elements
  $form = array();

  // Text field
  $form['Input'] = array(
    '#title' =&gt; t('Input field'),
    '#type' =&gt; 'textfield',
    '#required' =&gt; TRUE,
  );

  // Submit
  $form['submit'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; 'Search',
  );

    // Get the path to the module
    $path = drupal_get_path('module', 'mymodule');
    $form['#attached'] = array
    (
        'css' =&gt; array
        (
            'type' =&gt; 'file',
            'data' =&gt; $path . '/css/style.css',
        ),
        'js' =&gt; array
        (
            'type' =&gt; 'file',
            'data' =&gt; $path . '/js/sample.js',
        )
    );

  return $form;
}


function theme_mymodule_custom_form($variables )
{
    // Isolate the form definition form the $variables array
    $form = $variables['form'];
    $output = '&lt;h3&gt;Themed form&lt;/h3&gt;';
    $output .= drupal_render($form['Input']);
    $output .= drupal_render_children($form);
    return $output;
}
Somehow, this started working on my localhost. I think this was a cache issue. If you have the same problem, try clearing the cache.