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.
Paul
Posts: 154
Joined: Mon Aug 25, 2025 6:03 am
Has thanked: 30 times
Been thanked: 3 times

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

Unread post by Paul »

How would I hide the "Back" button from non-globeadmin users?
Jannie
Posts: 36
Joined: Sat Jun 09, 2018 4:36 pm
Location: Netherlands
Has thanked: 6 times
Been thanked: 1 time
Contact:

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

Unread post by Jannie »

Place this code in your form or (if needed for every form) in setup:

if (nuUserLogin()="" ){
nuHide('nuBackButton");
}
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 »

What Back Button do you mean.
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 »

This one:
BACKBTTN.PNG
You do not have the required permissions to view the files attached to this post.
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,

If you have an element called nuBackButton, you can use Jannie's code with a couple of changes...

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 tried that code (in the Browse custom code):

Code: Select all

if (nuUserLogin()=="" ){
   nuHide("nuBackButton");
}
and logged in as a non-admin user and this is the result:
BACKBTTN.PNG
You do not have the required permissions to view the files attached to this post.
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,

Maybe you have no element called nuBackButton (it is case sensative).

You could check this by running this in the browser console (F12)...

Code: Select all

   $('#nuBackButton').length
If this returns 0 there is no element with that ID.
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 »

nuBackButton.PNG
You do not have the required permissions to view the files attached to this post.
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 »

Then this should work...

Code: Select all

  $('#nuBackButton').hide()
BTW nuUserLogin() != 'globeadmin'
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 »

When placed in the custom code for Browse form, the code:

Code: Select all

  $('#nuBackButton').hide()
does not hide the Back button for any user.
Post Reply