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 dhineshkumar on
I want to assign class name to Create new account and Request new password links separately. i'm using sub-theme of Omega. Is it possible? If yes then how?
Comments
=-=
as the login block is a form I'd start by looking into a hook_form_alter in a custom module. You can also look to see if there is a theme function associated with the block in the user.module and override it in your template.php file.
I tried something
I have tried something to set custom class name to textfields in user login block by adding following code to my omega subtheme's template.php file :
Also I'm using ajax_register module for login purpose. I added $options['attributes']['class'] = 'custom-class1'; code above to $options['attributes']['title'] = t('Create new account'); (this code found on line no. 405) for testing purpose. Then class name was assigned to Create new account link. I think this is wrong approach.
I don't know how set class name to Create new account and Request new password links. Please help me how to move further.