You are here

function theme_webform_view in Webform 7.3

Same name and namespace in other branches
  1. 5.2 webform.module \theme_webform_view()
  2. 6.3 webform.module \theme_webform_view()
  3. 6.2 webform.module \theme_webform_view()
  4. 7.4 webform.module \theme_webform_view()

Output the Webform into the node content.

Parameters

$node: The webform node object.

$teaser: If this webform is being displayed as the teaser view of the node.

$page: If this webform node is being viewed as the main content of the page.

$form: The rendered form.

$enabled: If the form allowed to be completed by the current user.

1 theme call to theme_webform_view()
webform_node_view in ./webform.module
Implements hook_node_view().

File

./webform.module, line 1607
This module provides a simple way to create forms and questionnaires.

Code

function theme_webform_view($variables) {

  // Only show the form if this user is allowed access.
  if ($variables['webform']['#enabled']) {
    return drupal_render($variables['webform']['#form']);
  }
}