Call custom form in a block I am trying to call a custom form in a block. The form is written in my custom module.
I tried different ways to call the form, but not getting the form. 

Here is the syntax, I last tried. 

$form = drupal_get_form('my_custom_form');
print drupal_render($form); 
//my_custom_form is my form_id


(or)

drupal_render(drupal_get_form('my_custom_form'));


Here is the link I found a similar question, but didn't get the correct solution for my question. 
Form within a block
You should return your form using drupal_get_form in the content definition of your block. Drupal will do the rest.

For example like this:

function YOURMODULE_block_info()
{
    $blocks = array();

    $blocks['custom_block'] = array(
        'info' =&gt; t('Custom block example'),
        'title' =&gt; t('Custom block example'),
        'region' =&gt; 'content',
        'status' =&gt; 1,
    );

    return $blocks;
}

function YOURMODULE_block_view($delta = '')
{
    $block = array();

    switch ($delta) {
        case 'custom_block' :
            $block['content'] = YOURMODULE_block_content();
            break;
    }

    return $block;
}

function YOURMODULE_block_content()
{
    return drupal_get_form('my_custom_form');
}

function my_custom_form($form, &amp;$form_state)
{
    // Build your form

    return $form
}