I'm trying to create a block, with a radio button option in it, and a submit button. The radio button allows the user to select which type of content they would like to create, and when they click "submit", they are directed to the appropriate content type for creation.

Any hints? Is PHP coding required?

Comments

greylogic’s picture

use the form_api. you would need something like this. Implement a submit function. check for the value of content_type and redirect to the appropriate page.

function create_content_form() {
$options = node_get_types('names');
$form['content_type'] = array(
'#type' => 'radio',
'#title' => t('Select the type of content'),
'#options' => $options,
'#default_value' => 0,
'#description' => t('Description'),
);

return $form;
}

--------------------------------------------------------------
My attempt with Drupal - Jaanlo.com