By dubs on
Thanks for looking at this question....
I want to be able to display and form in a block when it's viewed. Is is possible to do this from a render array? If so, how can this be done.
Here's the function: -
function faq_search_block_view($delta = '') {
$block = array();
switch ($delta) {
case 'faq_search':
$block['subject'] = t('FAQ Search');
// I want to be able to something like this: -
$block['content'] = array(
'#type' => 'form',
'#form' => 'faq_search_form',
);
break;
}
return $block;
}
function faq_search_form($form, &$form_state) { ....
Apologies if the documentation exists - I've tried looking for a while now but can't find out how.
Comments
this might be what you are looking for...
Perfect - thanks so much!
Perfect - thanks so much!
Helpful
I needed this, too, and had trouble finding a proper example as well.
thanks
This is also what I was looking for. Much appreciated.
Also wanted to say thanks!
Also wanted to say thanks! This was helpful!