The scenario is a template (tpl) file outputting a list of contact forms where each one is unique to a term ID in it section on the page. I need to generate a custom options list per printed Webform block using a tid passed from the section it’s in in the template. So far I don’t see any way to do this.
sample.tpl.php
<?php
$block = module_invoke('webform', 'block_view', 'my-block-3581');
print render($block['content']);
?>
The above is printed for each section (node) on the page and I have access to the tid where the Webform block is printed but I can’t figure out any way to pass it to the form.