Page 1 of 2

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

Posted: Thu Oct 09, 2025 7:49 pm
by Paul
How would I hide the "Back" button from non-globeadmin users?

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

Posted: Thu Oct 09, 2025 9:37 pm
by Jannie
Place this code in your form or (if needed for every form) in setup:

if (nuUserLogin()="" ){
nuHide('nuBackButton");
}

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

Posted: Thu Oct 09, 2025 9:52 pm
by steven
What Back Button do you mean.

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

Posted: Thu Oct 09, 2025 10:03 pm
by Paul
This one:
BACKBTTN.PNG

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

Posted: Thu Oct 09, 2025 10:10 pm
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");
}

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

Posted: Thu Oct 09, 2025 10:24 pm
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

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

Posted: Thu Oct 09, 2025 10:39 pm
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.

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

Posted: Thu Oct 09, 2025 10:46 pm
by Paul
nuBackButton.PNG

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

Posted: Thu Oct 09, 2025 11:28 pm
by steven
Then this should work...

Code: Select all

  $('#nuBackButton').hide()
BTW nuUserLogin() != 'globeadmin'

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

Posted: Thu Oct 09, 2025 11:40 pm
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.