Community Documentation

Embedding Webforms in blocks

Last updated July 1, 2011. Created by alexreinhart on June 21, 2011.
Log in to edit this page.

By default, Webform publishes every form as its own page. This is convenient for landing pages, but what if you need the flexibility of a form in a block? Blocks let you place Webforms in sidebars or other regions, and a block can be present on multiple pages on your site.

Fortunately, the Webform module supports turning any form into a block. When editing the Webform, simply go to "Form settings", and you'll find an "Available as block" option under "Advanced settings". Checking the box will make the form appear in your blocks list, and it can be moved and adjusted just like any other Drupal block.

Note that the page content will not appear in the block -- only the form itself. Hence if you're creating a landing page with the form in a sidebar block, you'll want to create the landing page first, then create a Webform to appear in the sidebar as a completely separate node. You can use the block settings to get the block to appear on the correct pages only.

Page status

No known problems

Log in to edit this page

About this page

Drupal version
Drupal 6.x, Drupal 7.x
Audience
Site administrators

Site Building Guide

Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.
nobody click here