By default for creating content a new page is opened. I want to do this inside a block. A block where there will be some fields like title body taxonomy terms and a create content button. How can I do this?
3 Answers
The form block module will do what you want.
You could you do the same thing in code, using hook_block to create a block. And using drupal_get_form to render the form.

- 11,707
- 6
- 46
- 71
-
I am not looking for a form to be input in d block. I have a status defined in CCK wid fields title(using notitle module, so don't have to take it as input), body, categories and tags. I want this information to be feed in a block rather than the conventional create content page. Also, I have to add some jquery effects for the field. – w2lame Jun 18 '10 at 13:41
-
He's right. You can make a module, invoke hook_block, and use drupal_get_form to do it. – Kevin Jun 18 '10 at 13:50
-
How can I attach a css file to the above created panel or to the node create page.. – w2lame Jun 18 '10 at 16:03
-
You don't need to. The block is assigned an ID and a class based on what you want. – Kevin Jun 19 '10 at 16:10
Try the Panels module.
http://drupal.org/project/panels
It will let you override and re-arrange the node add/edit form.
But, as Jeremy stated, to use this form on other pages of the site you will need to do something custom like hook_block and invoke drupal_get_form.

- 13,153
- 11
- 60
- 87
I agree with the answers from Jeremy and Kevin, but want to give another one.
You can use views to create the block! All you have to do is create a new view display with a block display. Add the fields you want to show, add a link field for the node/add/foo link and give it a node id filter or default argument. Here you have to choose the node id of the node to display in the block. Done!
What's nice with this solution? You can use almost every feature of views theming, drag and drop field ordering, adding new fields is cheap and no extra modules. ;)
Regards
Mike

- 529
- 3
- 8