Page 1 of 1

Change button color when button is disabled for user

Posted: Wed Mar 05, 2025 12:29 pm
by 88tc88
Hi all! Quick and hopefully relatively easy question:

Is it possible to make the run- and input-buttons at my nuuserhome turn grey when they are disabled for the user that is viewing the page? Currently all the buttons on this page are default blue, but after applying acces levels I would like to turn the buttons that are not accessible (i.e. the buttons that lead to a form or report that is not accessible) to be grey.

Thanks in advance!

Re: Change button color when button is disabled for user

Posted: Wed Mar 05, 2025 1:00 pm
by steven
Hi 88c88,

Sometimes its easier, and more user friendly for each Access Level to have its own Home Form along with just the Buttons for that Level...

This might help... viewtopic.php?p=30607#p30607

OR

You'll need to put some JS on the Home Form that does something like this...

Code: Select all

if(nuAccessLevelCode() == 'Sales'){
    $('#myButton').css('background-color', 'grey')
}
ac2.png


Steven

Re: Change button color when button is disabled for user

Posted: Wed Mar 05, 2025 3:27 pm
by 88tc88
Thanks Steven, it works perfectly!