views:

131

answers:

4

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?

+2  A: 

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.

Jeremy French
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.
abhishekgupta92
He's right. You can make a module, invoke hook_block, and use drupal_get_form to do it.
Kevin
hmm, I got it..
abhishekgupta92
How can I attach a css file to the above created panel or to the node create page..
abhishekgupta92
You don't need to. The block is assigned an ID and a class based on what you want.
Kevin
+2  A: 

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.

Kevin
+1  A: 

Hi,

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

mikewink
A: 

I'm looking for somthing like for some time, and the last answer could be great, but I really don't get it. If me and abhishekgupta92 are sharing same need, I want to show in a block a kind of shoutbox, but really more advanced, something like a Create Content page, so you can provide a real time fuction to write something; kind of Twitter style, but with custom CCK Fields. Do you suggest to do this using Views?

Gius