Webform module provides a way to create forms, which can be used as contests, personalized contact forms, or petitions, etc. One of the recent form which I've created using webform is a Feedback form in site I've built. Webform module provide support for showing the webform as a block, which extends webform modules functionality to be shown anywhere on a page. Here's a sample code to render a webform programatically:
  $block = module_invoke('webform', 'block_view', 'client-block-16');
  print render($block['content']);
The Drupal API function module_invoke, invokes a hook in a particular module. The 16 in "client-block-16" is the webform node ID


Submitted by ychaugule on