2011-12-20 2 views
1

나는이 template.phpdrupal 6에서 사용자 정의 양식 템플릿에 오류 메시지가 표시되지 않습니까?

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

에 아래와 같은 기능을 사용했고, 코드의 아래 라인 NSA-create.tpl.php을 추가

<?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']) ?> 

는 제대로 렌더링하지만 오류/검증 메시지가 잘못된 필드에 대해서는 빨간색 경계선이 표시되지 않습니다.

+0

IIRC, 양식의 오류 메시지의 형식은 template._에 _not가 페이지 템플릿에 주입 얻을 즉 '표준'드루팔 메시지 채널을 사용을 가지고 유효하지 않은 필드의 빨간색 테두리는 필드 요소 래퍼에 'class = "error"로 표시되어야합니다. 렌더링 논리에 래핑 div가 포함되어 있는지 (CSS가 오류 클래스에 올바르게 반응하는지) 확인해야합니다. –

답변

1

는 page.tpl.php가

<?php print $messages; ?> 
관련 문제