Thursday, September 2, 2010

Custom Design for Content type forms in Drupal

Add the Following code in template.php in the theme folder.

function phptemplate_node_form($form) {
  switch ($form['#node']->type) {
    case 'printer': //content_type
    return theme_render_template(path_to_theme().'/printer-form.tpl.php', array('form' => $form));
    default:
     return theme_node_form($form);
      }
}