hide attachment/paper clip when certain selections on Catalog item

Mary
Mega Guru

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

1 REPLY 1

Musab Rasheed
Tera Sage
Tera Sage

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