I wonder if anyone has found a solution to the problem I'm seeing. I've built a very simple "beginner's form" in drupal.
function simple_nameform() {
$form = array(
'#method' => 'post',
'#prefix' => '<div class="staf">',
'#suffix' => '</div>',
'your_name' => array(
'#title' => t('Your Name'),
'#type' => 'textfield',
'#description' => t('Please enter your name')
),
'submit' => array(
'#type' => 'submit',
'#value' => t('submit')
)
);
return $form;
}
I've put this form in a module, with info, I've enabled the block in admin. When I'm on the main page render I run the commands
<div class="simple_overlay" id="simple">
<h1>Send to a Friend</h1>
<?php
$output = drupal_get_form('simple_nameform');
drupal_render($output);
?>
</div>
<pre>
<?php // debug purposes only
print_r($output);
?>
</pre>
The form does not appear to render from the "drupal_render" line, however, the $output variable is most definitely full of something that looks very much like it might be a drupal form.
(it's a huge array filled with my form elements. at parts it even manages to render some of the elements to page correctly).
Anyone with an idea of what I've missed?