2016-05-30 12 views
0

form_alter機能を使用してコンタクトフォームのフィールド要素をレンダリングする必要があります。hook_form_alter()からページ要素をレンダリングする方法drupal 6?

私は別にdrupal_render(drupal_get_form(form['name']))のようなフィールドをレンダリングする必要がありますその代わりに、完全に、TPLファイルにコンタクトフォーム負荷を$content変数を印刷します。

答えて

0

Drupal 7では、例として/modules/node/node.tpl.phpを参照できます。ここでは、ファイル内のコードスニペットです:

<div class="content"<?php print $content_attributes; ?>> 
    <?php 
    // We hide the comments and links now so that we can render them later. 
    hide($content['comments']); 
    hide($content['links']); 
    print render($content); 
    ?> 
</div> 

<?php print render($content['links']); ?> 

<?php print render($content['comments']); ?> 

私はDrupalの6に差があるかどうかわからないんだけど、あなたは試すことができます。

関連する問題