I need to remove the Register and Request new password tab from the login form page.

Not applicable

These are the screen shots attached for the two forms, Login form and Register form. In the first form - Login page, i need to remove the Register and Request new password navigation menus and display just Login, left aligned without highlighting it and unclickable link.

1498-screen-shot-2015-11-18-at-125114-pm.png

In the below screenshot I need to Remove Login and Request new password from the navigation menus and display Register only as a text field, without making it clickable link and not highlighting it and moving to the left.

1499-screen-shot-2015-11-18-at-125250-pm.png

1 15 1,630
15 REPLIES 15

I have done this with CSS modifications. I'll provide more details later!

Edit - last night I wrote up a description of how I do this kind of thing. I even attached CSS here. But now I don't see the update. I'll rewrite it in a bit. . . .

Dear @saranya sekar ,

Welcome to Apigee Community 🙂

You can able to do this with few lines of code. Apigee Developer Portal is built on top of Drupal. You can create a simple custom module & implement hook_menu_alter in your custom module with below code.

function modulename_menu_alter(&$item) {
  // Hide the "Create new account" tab
  $item['user/register']['type'] = MENU_CALLBACK;
  $items['user/password']['type'] = MENU_CALLBACK;
}

Replace modulename with your custom module name, enable the module & clear drupal cache. This hides the tab but still allows for /user/register to be accessed.

Anonthe easy way to achieve this using contributed module tabtamer . Just install the module & configure to hide tabs. No need of custom code.

Hi @Anil Sagar,

I downloaded the tabtamer module from drupal.org and moved the downloaded folder to sites/all/modules/contrib/tabtamer. Then In the site in the modules menu, i tried to find the tab tamer module to enable it, but I couldn't find it listed in the modules. I tried to run the update scripts as well. But couldn't figure out why I am not able to enable the module. Please let me know. Thanks!!

@saranya sekar , Are you sure you are in right instance ? Can you check the permissions of folder ? Are you in pantheon ? Did you push the files to pantheon if you are working on local instance ? It should work out of the box.

@Anil Sagar: I am working on the dev instance. I used git to clone the repository from pantheon and uploaded the folder to the repository.

@saranya sekar , It was not extracted properly, Ideally it should have .info, .module & other files, In your folder you have only .install file.

1511-screen-shot-2015-11-20-at-100353-am.png

1512-screen-shot-2015-11-20-at-100507-am.png

@Anil Sagar: I have all the three files inside the folder which i pushed to the repository.

@saranya sekar , Above screenshot is from your codebase only, It has only one file, two others was missing. It was a zip extraction error. Please check.

@saranya sekar , Your commit in pantheon also confirms same, You have checked in only one file, Please replace the folder with right extraction / add other two files.

@Anil Sagar: What else might be the issue?

Please check my comments above, It was a silly mistake, you haven't extracted zip file properly.

Ok, I will try to delete the folder and push it once again. Thanks!

Hi @Anil Sagar,

I could install the module now and under user, I can see the menus, Login, Register and Request new Password. There are three options for each menu like enabled, disabled and hidden. In the login page i want Login menu to be displayed and hide the other two-> Register and Request new password. But right now, all the three menu items have been hidden from the forms. In the same way in Register form page, I need Register menu to be shown and hide the Login and Request new password menu from the tab.Please see the attached screen shot below:

1543-screen-shot-2015-11-23-at-14459-pm.png

The Login form now looks like this:

1541-screen-shot-2015-11-23-at-15106-pm.png

previously it used to be like this:

1542-screen-shot-2015-11-18-at-125114-pm.png

I want to hide only Register and Request new password field in this form, but its removing all the three tabs from all the three forms. Please give some suggestions.

Thanks & Regards,

Saranya

I do this by modifying the CSS for the site.

The example I will show here is not specifically for the Login Form. It's for the modal Register form.

Here's the original "modal" Register form that's included in the Apigee Responsive theme.

1522-register-user-original.png

In my opinion, this is much too horsey - In fact it's not even possible on my screen to see the entire modal form at one time. I need to scroll. This surely violates some rule-of-UI, and it also violates my own sense of style. The form needs to be compacted, to use whitespace much more economically. Also the hints about email addresses - I didn't find to be helpful at all. I wanted to re-do the form so that it looked cleaner, and didn't require scrolling.

The way I did this was to first, create a new subtheme, based on Apigee Responsive, following the instructions that are available here.

Next, I iteratively developed the appropriate CSS to do what I wanted. This included the use of CSS selectors to find the elements I was interested in, and then using "display: none" on some of those elements. I also floated some elements to the left, to get things to appear on the same line. All of the css rules go into a new css file located at sites/all/themes/my-theme-name/css/my-theme-name.css , where my-theme-name is the name of the subtheme I created following the instructions referenced above.

The result is here:

1523-register-user-customized.png

To my eye, this is much cleaner, and it certainly is much more compact. It shows the power of what you can do with some simple CSS rules.

The example custom css I used is attached here.

my-custom-theme-css.txt

This won't exactly solve your problem but you can do the same kind of thing to remove or hide tabs, buttons, or other elements in your site.

Hi Dino,

Thanks for posting your comment. I don't need to customize my form, as I already did it, I need to customize the menus in the tab that is attached to the form at the top.