How to Hide Tabs in the Customer Portal Profile Page
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
- Go to Admin > Customer Portal > Customization.
- Open the Custom JS section.
- Paste the required JavaScript code.
- Save the changes.
To learn where to paste the Custom JS code, explore How to Configure Customer Portal Settings.
Before Customization
After Customization
Result
After the customization is applied, the selected tab is hidden from the My Profile page in the customer portal.
Frequently Asked Questions
-
Which tab does
hideTab(1)hide on the My Profile page?
ThehideTab()method uses zero-based indexing. On the My Profile page,hideTab(1)hides the Change Password tab. Use0for General,1for Change Password, and2for Security. -
Can I hide more than one tab on the My Profile page?
Yes. To hide multiple tabs, add multiplehideTab()lines in the same script. For example, usehideTab(1)andhideTab(2)together to hide both the Change Password and Security tabs. -
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. -
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.