How do I put a block in a form?
My searches on this site and on google only have lead to questions of putting a form in a block. I want the opposite. I have a form definition array in a module, and I want to add in an existing block.
How do I put a block in a form?
My searches on this site and on google only have lead to questions of putting a form in a block. I want the opposite. I have a form definition array in a module, and I want to add in an existing block.
$block = module_invoke('module_name', 'block_view', 'block_id');
$form['block'] = array(
'#markup' => render($block),
);