I want to render drupal 6 form through tpl file. for that 1. I have written mytheme_theme in template.php file and there I have define my template forms arguments and path for tpl file.
I have written tpl file
in form function at the end I have called theme by
'#theme' => 'my_template'
doing all these thing my from is rendering through tpl but now its not going into submit_hander()
and validation.
can any one help me these? I am not getting what's wrong in these.
see in my template.php contain:
function cs_theme(&$existing, $type, $theme, $path) {
$hooks = zen_theme($existing, $type, $theme, $path);
// Add your theme hooks like this:
/*
$hooks['hook_name_here'] = array( // Details go here );
*/
// @TODO: Needs detailed comments. Patches welcome!
$hooks['my_theme_example'] = array(
'arguments' => array(
'order' => null,
),
'render element' => 'form',
'template' => 'mymodule_template',
'path' => drupal_get_path('theme', 'theme_name') . '/templates',
);
return $hooks;
}
In these way I have printed all the form fields in my .tpl file is:
<?php print drupal_render($variables['order']['logo']);?>