Show content type form to block I've created one content type named Newsletter. And I want to display that content type form to block. I've tried with this code but failure. Your suggestions will be appreciated.

$my_module_form = drupal_get_form('blog-node-form');
$my_module_form = drupal_render($my_module_form);
Using contrib modules will certainly help for this. There are at least two I can think of:


Form Block (https://www.drupal.org/project/formblock)
Advanced From Block (https://www.drupal.org/project/afb)


To answer your question, however, you need to instantiate a new (or existing) node object to set as your form_state (Assuming the machine readable name of your content type is "newsletter").

global $user;  
$node = (object) array('uid' =&gt; $user-&gt;uid, 'name' =&gt; (isset($user-&gt;name) ? $user-&gt;name : ''), 'type' =&gt; 'newsletter', 'language' =&gt; LANGUAGE_NONE);
$form_state['build_info']['args'] = array($node);
form_load_include($form_state, 'inc', 'node', 'node.pages');
$form = drupal_build_form('newsletter_node_form', $form_state);


If you want the form to edit an existing node, the you can replace the $node = (object) part with a node_load([nid]) function.