php - getting title field from the process array in the webform -


i using webform module drupal.

i needed customize 1 of webform nodes.

so tried printing [title] => title of webform goes here!!! using <?php print drupal_render($form['process']['title']); ?>

but returns nothing, doing wrong here?

thanks!

fyi, form can rendered with; 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 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] => ... 

you should try this,

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

as 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 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] => ... 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -