Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

How to hide the "Back" button from non-globeadmin users Topic is solved

Questions related to customising nuBuilder Forte with JavaScript or PHP.
steven
Posts: 426
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 60 times
Been thanked: 55 times

Re: How to hide the "Back" button from non-globeadmin users

Unread post by steven »

Paul,

Are you saying you don't know how to debug these 3 lines of code yourself?

Code: Select all

if (nuUserLogin()!="globeadmin" ){
   nuHide("nuBackButton");
}
A short post is a good post.
Buy Kev a Coffee
Paul
Posts: 154
Joined: Mon Aug 25, 2025 6:03 am
Has thanked: 30 times
Been thanked: 3 times

Re: How to hide the "Back" button from non-globeadmin users

Unread post by Paul »

I am simply stating a fact.
Paul
Posts: 154
Joined: Mon Aug 25, 2025 6:03 am
Has thanked: 30 times
Been thanked: 3 times

Re: How to hide the "Back" button from non-globeadmin users

Unread post by Paul »

I am simply trying to figure out a solution to this problem. If you don't want to help, I understand.
kev1n
nuBuilder Team
Posts: 4591
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 539 times
Contact:

Re: How to hide the "Back" button from non-globeadmin users

Unread post by kev1n »

I think it’s better to add the Back button only when the globeadmin is logged in.
That means it should be "invisible" for all other users, and then this JavaScript can be used:

(add it under Setup → Header, inside the nuOnLoad() function)

Code: Select all

if (nuGlobalAccess()) {
   nuAddActionButton('Back');
}

In the future, this setting will be changed so that instead of using true/false, you’ll be able to choose between globeadmin, user, or everyone.
But for now, the approach described above should work fine.
Paul
Posts: 154
Joined: Mon Aug 25, 2025 6:03 am
Has thanked: 30 times
Been thanked: 3 times

Re: How to hide the "Back" button from non-globeadmin users

Unread post by Paul »

Excellent. Works as expected.
Post Reply