Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How do I disable the ability for users to add attachments to forms at the Task level on the User facing side bit not the backend?

Ccart
Giga Expert

I want to disable the red box below. globally for formats in the same department. 

find_real_file.png

 

But I want users to still be able to attach documents to TASKS via the backend:

find_real_file.png

I looked online and read a few things but I am not sure how to do this when I want to disable on the user side only. Thank you.

1 ACCEPTED SOLUTION

Willem
Giga Sage
Giga Sage

Add CSS to the portal:

 

Per widget Instance, or if you want to remove the Attachment button from the portal completely add to the CSS theme you are using:

find_real_file.png

I am using the OOTB Style La Jolla, which uses the CSS "sp-theme-la-jolla.css".

I added:

sp-attachment-button,

sp-attachment-button ~ span {

       display: none;

}

 

Result:

Before:

find_real_file.png

After:

find_real_file.png

Refer to:

https://community.servicenow.com/community?id=community_question&sys_id=19920b21dbd8dbc01dcaf3231f96...

View solution in original post

6 REPLIES 6

I have 109 forms belonging to the same Configuration item category I need to do this for. I played around but I'm having trouble selecting all 109. Is there a way to apply this to all of the forms at once?

 

For instance, the widget I want to get rid of is on a global "Ticket Form" portal page.

This ticket form page is shared by every form in my instance. I want o to disable the "attachment" widget on the "ticket form" page in some but not all ticket forms (just the 109). 

The options I provided is for the complete portal or for the widget, so not conditional.

If you want it dynamically you have to clone/customize the widget. Göran has a nice video about that:

https://www.youtube.com/watch?v=xeh8-OA8UMc