How to Hide the add attachments button on a request item in the service portal

garethprice
Kilo Expert

Hi All

I want to hide the "add attachments" button on one of my service portal request items.

I've already hidden the submit button using the client controller in a widget using the following script.

function() {

  /* widget controller */

  var c = this;

  hideButtons();  

 

  function hideButtons(){  

  $('button[name="submit"]').hide();  

  }  

    }  

is there a way to also hide the add attachment button in the same way?

5 REPLIES 5

Ujjawal Vishnoi
Mega Sage
Mega Sage

Use onload client script to disble attchement as below


g_form.disableAttachments();


Hi



would that disable attachments for all items? or just the specific item?



i want to disable attachments for a specific item



Thanks


Then you can add an if condition for the sys_id of that catalog item.


Hi



The script has worked as far as attachments are disabled but the button is still visible.



however when i view the item through the service portal the "Add attachments" button is still visible and functioning