Inserting a form into a block in Drupal doesn't work I am creating block module in Drupal 7.

In the body of block I want to put the form which will restripe the data of table in forms.

I have created block as shown below but it doesn't showing the form.

&lt;?php 
/**
 * @file
 *  This is module file which display the links on the welcome page.
 *  This module will create a block of the link which is to be displayed on the welcome page.
 */

/**
 * Implements hook_block_info().
 *
 * This hook declares what blocks are provided by the module.
 */
function welcomepage_links_block_info() {
  $blocks['user-filter-ajax'] = array(
        'info' =&gt; t('User Filter'),
        'cache' =&gt; DRUPAL_CACHE_PER_ROLE, // default
  );
  return $blocks;
}

/**
 * Implements hook_block_view().
 *
 * This hook generates the contents of the blocks themselves.
 */
function welcomepage_links_block_view($delta = '') {
  //The $delta parameter tells us which block is being requested.
  switch ($delta) {
    case 'user-filter-ajax':
        $block['subject'] = t('User Filter');
        $block['content'] = drupal_get_form('restripe_command_example_fieldset');
        break;
   }
  return $block;
}

function welcomepage_links_form() {
    $form = array();
    $form['restripe_command_example_fieldset'] = array(
        '#type' =&gt; 'fieldset',
        '#title' =&gt; t("Demonstrates the Ajax 'restripe' command.")
);
    $form['restripe_command_example_fieldset']['restripe_num_rows'] = array(
            '#type' =&gt; 'select',
            '#default_value' =&gt; !empty($form_state['values']['restripe_num_rows']) ? $form_state['values']['restripe_num_rows'] : 1,
            '#options' =&gt; drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)),
            '#ajax' =&gt; array(
                    'callback' =&gt; 'user_filter_ajax_restripe_num_rows',
                    'method' =&gt; 'replace',
                    'wrapper' =&gt; 'restripe_table',
            ),
    );
    $form['restripe_command_example_fieldset']['restripe_restripe'] = array(
            '#type' =&gt; 'submit',
            '#value' =&gt; t("Restripe the table"),
            '#ajax' =&gt; array(
                    'callback' =&gt; 'ajax_example_advanced_commands_restripe_callback',
            ),
            '#suffix' =&gt; "&lt;div id='restripe_div'&gt;
            &lt;table id='restripe_table' style='border: 1px solid black' &gt;
            &lt;tr id='table-first'&gt;&lt;td&gt;first row&lt;/td&gt;&lt;/tr&gt;
            &lt;/table&gt;
            &lt;/div&gt;
            &lt;div id='restripe_status'&gt;'Restripe' Command Status: Unknown&lt;/div&gt;",
    );
    return $form;
}
Got it.

There was error in my programming. This is how i fixed it.

&lt;?php 
/**
 * @file
 *  This is module file which display the links on the welcome page.
 *  This module will create a block of the link which is to be displayed on the welcome page.
 */

/**
 * Implements hook_block_info().
 *
 * This hook declares what blocks are provided by the module.
 */
function welcomepage_links_block_info() {
  $blocks['user-filter-ajax'] = array(
        'info' =&gt; t('User Filter'),
        'cache' =&gt; DRUPAL_CACHE_PER_ROLE, // default
  );
  return $blocks;
}

/**
 * Implements hook_block_view().
 *
 * This hook generates the contents of the blocks themselves.
 */
function welcomepage_links_block_view($delta = '') {
  //The $delta parameter tells us which block is being requested.
  switch ($delta) {
    case 'user-filter-ajax':
        $block['subject'] = t('User Filter');
        $block['content'] = drupal_get_form('welcomepage_links_form'); /**Problem was here**/
        break;
   }
  return $block;
}

function welcomepage_links_form() {
    $form = array();
    $form['restripe_command_example_fieldset'] = array(
        '#type' =&gt; 'fieldset',
        '#title' =&gt; t("Demonstrates the Ajax 'restripe' command.")
);
    $form['restripe_command_example_fieldset']['restripe_num_rows'] = array(
            '#type' =&gt; 'select',
            '#default_value' =&gt; !empty($form_state['values']['restripe_num_rows']) ? $form_state['values']['restripe_num_rows'] : 1,
            '#options' =&gt; drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)),
            '#ajax' =&gt; array(
                    'callback' =&gt; 'user_filter_ajax_restripe_num_rows',
                    'method' =&gt; 'replace',
                    'wrapper' =&gt; 'restripe_table',
            ),
    );
    $form['restripe_command_example_fieldset']['restripe_restripe'] = array(
            '#type' =&gt; 'submit',
            '#value' =&gt; t("Restripe the table"),
            '#ajax' =&gt; array(
                    'callback' =&gt; 'ajax_example_advanced_commands_restripe_callback',
            ),
            '#suffix' =&gt; "&lt;div id='restripe_div'&gt;
            &lt;table id='restripe_table' style='border: 1px solid black' &gt;
            &lt;tr id='table-first'&gt;&lt;td&gt;first row&lt;/td&gt;&lt;/tr&gt;
            &lt;/table&gt;
            &lt;/div&gt;
            &lt;div id='restripe_status'&gt;'Restripe' Command Status: Unknown&lt;/div&gt;",
    );
    return $form;
}