Reply to comment

How to theme the login box

Hello there!

Today I am talking about the login customization.

Here you are the steps:

1 - Create a new block called login.

2 - Add the following code:

<?php
global $user;
?>

<form accept-charset="UTF-8" action="/user?&lt;!--{cke_protected}%3C%3Fphp%20print%20drupal_get_destination()%20%3F%3E--&gt;" id="user-login-form" method="post">
<ul>
<li class="text">
<label for="edit-name">Username:</label> <input class="form-text required" id="edit-name" maxlength="60" name="name" size="15" type="text" value="" /></li>
<li class="text">
<label for="edit-pass">Password:</label> <input class="form-text required" id="edit-pass" maxlength="60" name="pass" size="15" type="password" /><a class="forgot" href="/user/password"><?php print t('Request new password')?></a></li>
<li class="checkbox">
<input name="remember" type="checkbox" /> <label for="remember">Remember me?</label></li>
<li class="submit">
<input class="form-submit" id="edit-submit" name="op" type="submit" value="Log in" /><img alt="" src="/sites/all/themes/aviva_partner/img/structure/button/bluearrowright.png" /></li>
</ul>
<input id="edit-user-login" name="form_id" type="hidden" value="user_login" />
</form>

3 - Set this block to you page region.

enjoy! =D

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options