Category

How to Hide Tabs in the Customer Portal Profile Page

Updated:

In BoldDesk, you can hide specific tabs on the My Profile page in the customer portal by using Custom JS. This is useful when you want to simplify the profile page and display only the tabs that are relevant to your users.

Hide a Tab by Using Custom JS

To hide a tab on the My Profile page, add JavaScript code in the Custom JS section of the customer portal customization settings.

The tabs on the My Profile page use the following index values:

  • General = 0
  • Change Password = 1
  • Security = 2

Custom JS Code

Use the appropriate hideTab() index based on the tab that you want to hide.

Hide the General tab

let interval = setInterval(function() {
    var tab = document.querySelector("#user-details-tab");
    if (tab && tab.ej2_instances && tab.ej2_instances[0]) {
        tab.ej2_instances[0].hideTab(0);
        clearInterval(interval);
    }
}, 100);

Hide the Change Password tab

let interval = setInterval(function() {
    var tab = document.querySelector("#user-details-tab");
    if (tab && tab.ej2_instances && tab.ej2_instances[0]) {
        tab.ej2_instances[0].hideTab(1);
        clearInterval(interval);
    }
}, 100);

Hide the Security tab

let interval = setInterval(function() {
    var tab = document.querySelector("#user-details-tab");
    if (tab && tab.ej2_instances && tab.ej2_instances[0]) {
        tab.ej2_instances[0].hideTab(2);
        clearInterval(interval);
    }
}, 100);

Hide Multiple Tabs

If you want to hide more than one tab, add multiple hideTab() lines in the same script.

For example, to hide both Change Password and Security:

let interval = setInterval(function() {
    var tab = document.querySelector("#user-details-tab");
    if (tab && tab.ej2_instances && tab.ej2_instances[0]) {
        tab.ej2_instances[0].hideTab(1);
        tab.ej2_instances[0].hideTab(2);
        clearInterval(interval);
    }
}, 100);

Paste the Custom JS Code in the Customer Portal

Steps to add the Custom JS code

  1. Go to Admin > Customer Portal > Customization.
  2. Open the Custom JS section.
  3. Paste the required JavaScript code.
  4. Save the changes.

To learn where to paste the Custom JS code, explore How to Configure Customer Portal Settings.

Before Customization

Before.png

After Customization

After.png

Result

After the customization is applied, the selected tab is hidden from the My Profile page in the customer portal.

Frequently Asked Questions

  1. Which tab does hideTab(1) hide on the My Profile page?
    The hideTab() method uses zero-based indexing. On the My Profile page, hideTab(1) hides the Change Password tab. Use 0 for General, 1 for Change Password, and 2 for Security.

  2. Can I hide more than one tab on the My Profile page?
    Yes. To hide multiple tabs, add multiple hideTab() lines in the same script. For example, use hideTab(1) and hideTab(2) together to hide both the Change Password and Security tabs.

  3. Where should I add the Custom JS code in BoldDesk?
    Go to Admin > Customer Portal > Customization, open the Custom JS section, paste the required JavaScript code, and then save the changes.

  4. Does hiding a tab using Custom JS remove the feature from BoldDesk?
    No. Hiding a tab using Custom JS changes only the visibility of the tab in the customer portal UI. It does not remove the underlying feature or permanently disable it in BoldDesk.

Related Article

Restrict Agents Ticket Creation in Customer Portal

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied
Access denied
Access denied

No articles or sections found
No articles or sections found