- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2016 01:37 PM
I wrote below script in an onload client script on a catalog item but I still see the paper clip icon. Any ideas??
Running on Eureka patch 11
function onLoad() {
//Type appropriate comment here, and begin script below
g_form.disableAttachments();
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2016 09:10 AM
In Eureka, it is not a button. My script works post Eureka. Use this in your client script
var list=document.getElementsByTagName("img");
for(var i=0; i<list.length; i++){
if(list[i].title=='Attachments...'){
list[i].style.display='none';
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2016 12:15 PM
From michalc:
$('ATTACHMENT_ELEMENT_ID').hide();
OR
document.getElementById("ATTACHMENT_ELEMENT_ID").remove();
(source: Hide / Disable attachment icon in service catalog)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2016 12:20 PM
You will have to replace attachment element id with sc_attachment_button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2016 08:41 AM
HI Abhinay/Tim,
None of the suggested code worked. I was able to add attachments even after using g_form.disableAttachments()
Also, in google chrome when i inspect the paper clip icon i did not find ID attribute to it. May be that's why your suggested code is not working.
Error: i guess could not find the element ID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2016 09:07 AM
That's very odd. When I look at it, the ID is sc_attachment_button. This worked for me:
document.getElementById("sc_attachment_button").remove();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2016 09:10 AM
It is not a button in Eureka