Home Affected User

How to hide fields in Affected User

Darren_GroveDarren_Grove Customer IT Monkey ✭

Hello,

We have a requirement to hide some of the fields on the Affected User app on the portal

E.g. Support Group and Source.

How can we do this?

Answers

  • Tony_CollettTony_Collett Cireson Support Super IT Monkey ✭✭✭✭✭

    Hi Darren,

    We've had a look at this question and it can be implemented fairly simply.

    First, make sure you have the script loader from https://community.cireson.com/discussion/comment/14268#Comment_14268 in your custom.js code.

    Next, create a new .js file and call it 'AU_HideFields.js' and put this file in your CustomSpace folder, inside add the following code:

    (function(){
    setTimeout(function(){
    var sg = localizationHelper.localize('SupportGroup');
    var source = localizationHelper.localize('Source');
    $('label:contains("' + sg + '")').parent().hide();
    $('label:contains("' + source + '")').parent().hide();
    },2200)
    }())
    

    Next, add the following line to the bottom of your custom.js file

    loadScript('/CustomSpace/AU_HideFields.js',["AffectedUser"]);
    

    This should let you hide Support Group and source fields. Modify the code in AU_HideFields.js to hide more or less fields based on their name

Sign In or Register to comment.