|
|
Drupal example source code file (webform_handler_field_form_body.inc)
The webform_handler_field_form_body.inc Drupal example source code<?php /** * @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() { parent::construct(); $this->additional_fields['nid'] = 'nid'; } function option_definition() { $options = parent::option_definition(); $options['label'] = array('default' => 'Form', 'translatable' => TRUE); return $options; } function query() { $this->ensure_my_table(); $this->add_additional_fields(); } function render($values) { $node = node_load($values->{$this->aliases['nid']}); if (node_access('view', $node)) { $form_body = drupal_render(node_view($node)); } else { return; } 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: |
"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.