2011-12-20 13 views
1

私はtemplate.phpに機能下回っdrupal 6のカスタムフォームテンプレートにエラーメッセージが表示されない?

function mytheme_theme() { 
    return array(
    'nsa_create_form' => array(
     'arguments' => array('form' => NULL), 
     'template' => 'nsa-create', 
     ), 
    ); 
} 

を使用してこれをしなかったし、その適切にレンダリングされたが、エラー/確認メッセージがあるコード

<?php if ($show_messages && $messages): print $messages; endif; ?> 

<?= drupal_render($form['start_date']) ?> 
<?= drupal_render($form['end_date']) ?> 
<?= drupal_render($form['confirm_dates']) ?> 
<?= drupal_render($form['name']) ?> 
<?= drupal_render($form['emp_id']) ?> 
<?= drupal_render($form['client']) ?> 
<?= drupal_render($form['designation']) ?> 
<?= drupal_render($form['manager']) ?> 
<?= drupal_render($form['competency']) ?> 
<?= drupal_render($form['wrapper_nsa']) ?> 
<?= drupal_render($form['submit']) ?> 

の下の行にNSA-create.tpl.phpを追加しました無効なフィールドの場合は赤い枠線が表示されません。

+0

IIRC、彼らはフォームtemplate._に_notページテンプレート、内に注入されます。すなわちフォームのエラーメッセージは、「標準」Drupalのメッセージチャネルを使用していません無効なフィールドの赤い枠線については、フィールド要素ラッパーで 'class =" error "'となるはずです。レンダリングロジックにラッピングdivが含まれている(CSSがエラークラスに適切に反応している)かどうかを確認する必要があります。 –

答えて

1

あなたのpage.tpl.phpが

<?php print $messages; ?> 
関連する問題