- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2022 10:54 PM
Hi Folks,
I am trying to hide the Attachment paper clip from the form, but it is not working on portal. I tried onload g_form.disableAttachments(). Attaching the screenshots - Any help would be great!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2022 11:11 PM
Hi
the most simple way is hiding the paperclip icon via CSS. You have different places where to add the required CSS.
For example open the page instance via holding the Ctrl key pressed and right-clicking anywhere in the page. Then select "Instance in Page Editor"
Then scroll down to the CSS field:
and enter:
sp-attachment-button,
sp-attachment-button ~ span {
display: none;
}
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2022 11:11 PM
Hi
the most simple way is hiding the paperclip icon via CSS. You have different places where to add the required CSS.
For example open the page instance via holding the Ctrl key pressed and right-clicking anywhere in the page. Then select "Instance in Page Editor"
Then scroll down to the CSS field:
and enter:
sp-attachment-button,
sp-attachment-button ~ span {
display: none;
}
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2022 11:46 PM
Hi Tapish Sharma,
1. If it is a form widget clone the widget and comment the code(line 61-66) as shown below image.
2. Create a page and select the updated widget(copy of form) as shown below.
3. On the behavior section select the page that created as above.
4. Then it will look like below without attachment icon.
Hope it helps!!
Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Pavankumar
ServiceNow Community MVP 2024.
Thanks,
Pavankumar