LeBlaireau
LeBlaireau

Reputation: 17467

Render a form in page.tpl.php

In my template.php I create a form and then in hook_preprocess_page function I assign it to a variable but how to I render it out in page.tpl.php

$variables['myform'] = drupal_get_form('test_myform');

Upvotes: 1

Views: 4171

Answers (1)

Muhammad Reda
Muhammad Reda

Reputation: 27043

You can try add the following line in your page.tpl.php

print drupal_render($myform);

Hope this works... Muhammad.

Upvotes: 3

Related Questions