Custom Template files for Drupal CCK Forms
Submitted by amitsedai on Mon, 09/23/2013 - 22:24To render a Drupal CCK form in a template file, add the following lines in the currently enabled theme. Assuming the enabled theme to be footheme
For a cck form called external_exam, the theme function can be used to provide a template file called external_exam_form.tpl.php under templates directory.
<?php
function footheme_theme() {
return array(
'external_exam_node_form' => array(
'arguments' => array('form' => NULL),
'template' => 'templates/external_exam_form',
'render element' => 'form'
),
);
}
?>