Load node form from menu callback


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. module_load_include('inc', 'node', 'node.pages');
  2.  
  3. // Mock the node type
  4. $node = new stdClass();
  5. $node->type = '{node type}';
  6.  
  7. $form = drupal_get_form('{node type}_node_form', $node);
  8.  
  9. return $form;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.