0
在drupal 6中,我製作了一個自定義的user-register.tpl.php表單,當用戶名或電子郵件已存在時,該框變爲紅色,但錯誤信息「您的電子郵件已被註冊「不顯示。當他們成功註冊「您的登錄信息已郵寄給您」時,它們也都不成功。user-register.tpl.php錯誤信息沒有顯示
我該如何解決這個問題? 我的代碼是
<div id="registration_form">
<div class="field">
<?php print drupal_render($form['name']); // prints the username field
?>
</div>
<div class="field">
<?php
print drupal_render($form['mail']); // print the email field
?>
</div>
<div class="field">
<?php
print drupal_render($form['submit']); // print the submit button
?>
</div>
<?php
print drupal_render($form['timezone']);
print drupal_render($form['form_build_id']);
print drupal_render($form['form_id']);
?>
<?php
drupal_set_message('<pre>'. var_export($variables,TRUE) .'</pre>');
?>
謝謝
太棒了!這是有用的,我把這個代碼放在user-register.tpl.php和user-login.tpl.php頁面中,並且沒有顯示出來。把它放在page.tpl.php中。謝謝 –