June 2013

Programmatically output webform block

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: