Is it possible to put a cck form in a block? I want anonymous visitors to be able to post in a form and authenticated users to view what have been posted in views.

/ Pierre Andersson, Sweden

Comments

Hej Pierre!

Hej Pierre! Äntligen använder också du det rätta publiceringssystemet!

The quickest way should be to add a new block with PHP input format. In that block, call drupal_get_form() and output the result of that. You could do the same using a custom module. Try this (not sure if it will work, haven't tested it):

<?php

global $user;
$type = 'pierresnodetype';
$node = array('uid' => $user->uid, 'name' => $user->name, 'type' => $type);
print
drupal_get_form($type . '_node_form', $node);

?>

/Hannes

Thanks

It works just fine. Tack!!!