从webform中的进程数组中获取title字段


getting title field from the process array in the webform

我正在使用Drupal的webform模块。

我需要自定义其中一个网络表单节点。

所以我试着用<?php print drupal_render($form['process']['title']); ?> 打印[title] => title of this webform goes here!!!

但它什么也没有回报,我在这里做错了什么?

谢谢!

仅供参考,该表单可以使用呈现;drupal_render($form['submitted']);

Array ( [#attached] => Array ( [css] => Array ( [0] => sites/all/modules/webform/css/webform.css ) [js] => Array ( [0] => sites/all/modules/webform/js/webform.js ) ) [#process] => Array ( [0] => webform_client_form_includes ) [#node] => stdClass Object ( [vid] => 22 [uid] => 2 [title] => title of this webform goes here!!! [log] => [status] => 1 [comment] => 1 [promote] => 1 [sticky] => 0 [nid] => 22 [type] => webform [language] => en [created] => 1373585579 [changed] => 1374117294 [tnid] => 0 [translate] => 0 [revision_timestamp] => 1374117294 [revision_uid] => 8 [body] => Array ( ) [rdf_mapping] => Array ( [rdftype] => ...

你应该试试这个,

echo $form[#node]->title;
var_dump($form[#node]);// to test it your node data

从您的array

Array ( 
     [#attached] => Array ([css] => Array ( [0] => sites/all/modules/webform/css/webform.css ) [js] => Array ( [0] =>   sites/all/modules/webform/js/webform.js ))
     [#process] => Array ( [0] => webform_client_form_includes ) 
     [#node] => stdClass Object ( [vid] => 22 [uid] => 2 [title] => title of this webform goes here!!! [log] => [status] => 1 [comment] => 1 [promote] => 1 [sticky] => 0 [nid] => 22 [type] => webform [language] => en [created] => 1373585579 [changed] => 1374117294 [tnid] => 0 [translate] => 0 [revision_timestamp] => 1374117294 [revision_uid] => 8 [body] => Array ( ) [rdf_mapping] => Array ( [rdftype] => ...