tags:

views:

294

answers:

3

Im trying to get drupal_get_form('ccknode_node_form') to work, but nothing prints.
I've tried for example drupal_get_form('user_register'), and that works.

Im sure its very simple problem, but i really need som help with this.
Thanks
/Anders

+1  A: 

The node_form is located in node.pages.inc which is what you are missing. If you add

module_load_include('inc', 'node', 'node.pages');

that should fix it.

googletorp
That sort of worked, but i get an empty form array. It wont print fields or anything. Just the "bottom"-options of node_form (revision, authouring and publishing options). What i want is to print a cck_node_form in a custom block, but i cant get it to work...
andersandersson666
A: 
ElectronicBlacksmith
A: 

Hi andersandersson666,

Did you ever get this sorted? I'm currently having the same problem

systemick
Yes, i sort of solved it. Googletorps answer got the form to print, but i wanted mor control, so ultimately i made my own form and called node_save on submit of that form. Worked out quite nice. Probably not the safest way, but i did the trick./Anders
andersandersson666