- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2015 10:16 PM
Hi,
I have implemented a 'defined relationship ' to show all attachments in a requested item and catalog task form under tabbed
sections. I would like to hide the list of attachments that shows up at the top of the form by default. Any one knows how to
do this?
Thanks,
Debashree
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2015 10:40 PM
Hi Debashree,
You can hide attachment link by this:
$$('img[title="Attachments..."]')[0].up().up().down().hide();
For hiding attachment section, You need to write again custom javscritp code.
document.getElementById('header_attachment').style.display="none";
As well as you have to hide attachment section line
for this :
document.getElementById('header_attachment_line').style.display="none";
Put these 2 lines on any onload client script.
-
Cheers,
Akash Rajput
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2017 08:58 AM
Hi,
I used the following piece of code in onload client script to "hide" UI formatter on the form:
document.getElementById('ui_formatter_name').style.display='none';
To display:
document.getElementById('ui_formatter_name').style.display='';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2017 01:32 AM
Hi Keerthana,
I have the same requirement (hide UI formatter)
I tried to use document.getElementById('ui_formatter_name').style.display='none' but this doesn't work --> Log says Cannot read property 'style' of null
Did you find a solution ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2015 10:41 PM
Hello Debashree.
You can create an onLoad client script:
function onLoad() {
document.getElementById('header_attachment').style.display = 'none';
document.getElementById('header_attachment_line').style.display = 'none';
}
It is important to mention that ServiceNow recommend to avoid DOM manipulation when possible.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2015 09:59 AM
Thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2016 02:21 PM
How to display again after hiding it...