Last active
April 28, 2016 07:56
-
-
Save jakelacey2012/2e993538bc854e84458364fd47f5b88a to your computer and use it in GitHub Desktop.
(Drupal) Node Add Form Programatically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This will fetch and display our node form of a chosen content type. | |
* @param $type [String] : this is the content type. | |
* @return $form [array] : form containing elements | |
*/ | |
function get_node_form($type) { | |
module_load_include('inc', 'node', 'node.pages'); | |
$form = node_add($type); | |
return $form; | |
} | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment