Warning: Undefined array key "HTTPS" in include() (line 29 of /opt/www/fdv2/drupal.stage/web/sites/default/settings.local.php).
include('/opt/www/fdv2/drupal.stage/web/sites/default/settings.local.php') (Line: 4)
require('/opt/www/fdv2/drupal.stage/web/sites/drupal001.net/settings.php') (Line: 145)
Drupal\Core\Site\Settings::initialize('/opt/www/fdv2/drupal.stage/web', 'sites/drupal001.net', Object) (Line: 1099)
Drupal\Core\DrupalKernel->initializeSettings(Object) (Line: 701)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
如何获取一个node的表单阿? - Drupal大学 - Drupal问答论坛
首页 / 帖子
如何获取一个node的表单阿?

我想要在test/form页面显示某个node的字段的表单,可是显示出来是错误的,见图片,代码如下,求帮看看要怎么改阿

 
function modal_entities_menu() {
  $items = array();
  $items['test/form'] = array(
    'title' => 'Edit',
    'page callback' => 'node_page_edit2',
    'access callback' => 'node_access',
    'access arguments' => array('update', 1),
    'weight' => 0,
    'type' => MENU_LOCAL_TASK,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
   );
  return $items;
} 
 
 function node_page_edit2() {
$node = node_load(3559);
print_r($node->type);
$type_name = node_type_get_name($node);
drupal_set_title(t('<em>Edit @type</em> @title', array('@type' => $type_name, '@title' => $node->title)), PASS_THROUGH);
$form=drupal_get_form($node->type . '_node_form', $node);
dpm($form);
return $form;

2个答案
王斌
发布于:2015-02-26 04:56

你图片上显示的内容是来自Feeds模块的。

闻涛
发布于:2015-02-26 09:08

自己解决了 谢谢