hide attachment/paper clip when certain selections on Catalog item

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2022 08:40 AM
Hello All
I have a catalo item for the type if they select NEW-attachment shown but if the select Update or Retire options they want to Attachments/paper clip option hidden
How would I go about hiding paperclip attachment if type= update or Retire?
Thanks much
Labels:
- Labels:
-
Request Management
-
Service Catalog
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2022 10:23 AM
Hello,
Try this code in on change client script and see if that works?
var attachmentButton = top.document.getElementsByTagName('sp-attachment-button');
attachmentButton[0].parentNode.hidden = true;
Regards
Please hit like and mark my response as correct if that helps
Regards,
Musab
Regards,
Musab