home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (webform_handler_field_form_body.inc)

This example Drupal source code file (webform_handler_field_form_body.inc) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

drupal_render, extends, form_body, function, if, node, options, parent::construct, php, render, return, translatable, true, values

The webform_handler_field_form_body.inc Drupal example source code


* @file
* Views handler to display the content of a webform form.

 * Field handler to present the Webform form body to the user.
class webform_handler_field_form_body extends views_handler_field {
  function construct() {
    $this->additional_fields['nid'] = 'nid';

  function option_definition() {
    $options = parent::option_definition();
    $options['label'] = array('default' => 'Form', 'translatable' => TRUE);
    return $options;

  function query() {

  function render($values) {
    $node = node_load($values->{$this->aliases['nid']});

    if (node_access('view', $node)) {
      $form_body = drupal_render(node_view($node));
    else {

    return $form_body;

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal webform_handler_field_form_body.inc source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.