drupal - How to display a custom form in a newly created template page -


i have hook_form in custom module , have customized page.tpl.php file .is there way can pass form tpl page.i thought of passing $form variable tpl page through hook_theme function quite not working.

the standard method use preprocess function, either in theme or module

function mymodule_preprocess_page(&$vars) {   $vars['some_form'] = drupal_get_form('mymodule_some_form'); } 

then in template file:

<?php echo $some_form; ?> 

you'll need clear caches after implementing hook theme registry pick up.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -