Service Portal : Paperclip and "Add attachment", how to remove this for a certain Requested Item

rody-bjerke
Giga Guru

Hi,

Is there any way to remove / hide the Paperclip with "Add attachment" on a certain requested item in the Service Portal?

 

Best regards,

1 ACCEPTED SOLUTION

tomashrobarik
Giga Guru

One possible way might be including an onLoad client script for your item e.g.

function onLoad() { 
   this.jQuery('label:has(sp-attachment-button)').hide();
}

But this is depending on the DOM structure. Not to mention, that it will take a second to hide it, so the user might notice paperclip icon at the first load.

Another approach could be like cloning the OOTB widget and hiding the attachment part based on your business logic, e.g. the cat item might contain a new checkbox field disable attachments.

Currently I'm not aware of any simpler solution.

 

View solution in original post

1 REPLY 1

tomashrobarik
Giga Guru

One possible way might be including an onLoad client script for your item e.g.

function onLoad() { 
   this.jQuery('label:has(sp-attachment-button)').hide();
}

But this is depending on the DOM structure. Not to mention, that it will take a second to hide it, so the user might notice paperclip icon at the first load.

Another approach could be like cloning the OOTB widget and hiding the attachment part based on your business logic, e.g. the cat item might contain a new checkbox field disable attachments.

Currently I'm not aware of any simpler solution.