Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By joejoe04 on
Hi,
If I wanted to edit the Default Login Form, what file would I do this in? Is it in the phptemplate.engine file? All I want to do is edit how it outputs the HTML for it because the way they have it set up, its making it difficult for me to get it to display how I want. Is there a certain function name that I should be looking for? If anyone can help me out I'd really appreciate it.
Joe
Comments
theme it
Cool. See the theming guide.
I think you'll want to start with an addition to your template.php
... which is where you'd hijack the display of the user login block for complete control.
It's (FAPI manipulation) a bit scary, but you have to start there to see what drupal_render() would have done to it normally.
There are probably some easier approaches, but it depends exactly what you are changing.
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards
This worked well for modifying prompt descriptions
This worked well for tweaking a site that uses LDAP authentication against a Novell NDS directory tree. I wanted to remove the site name from the prompts and hard code some other text in its place. I started with dman's example, and found the elements to update by sifting through modules/user/user.module.
Thanks!
this is what i did
this is how i managed it. i wanted to take off descriptions from the text fields and to reduce the width of both username field and the password field.
place this code snippet in the phptemplate file.
and then create a file called user_login.tpl.php and then place the following code in that file.
so now we are set with the customized user login form. if you want to include it in any of the tpl files just print out the variable $user_login_form.
print $user_login_form;
this worked for me. so should work for you too.
--
Praveen Gunasekara
http://rarepraveen.blogspot.com