Hide 'Submit' button on Portal without DOM manipulation

Thi Dinh Nguyen
Tera Expert

Hello,

Is there any way to hide the Submit button on a catalog item based on a condition without having to use DOM manipulation? I searched the Community and all solutions required DOM manipulation, which is not recommended in ServiceNow development.

Thanks,

Thi

1 ACCEPTED SOLUTION

Ahmmed Ali
Mega Sage

Hello @Thi Dinh Nguyen 

 

As for as I know, it is not possible without DOM manipulation. If you want to avoid it, then you can consider the other workaround such as writing onSubmit client script to restrict the submission of the form.

 

But again, it depends on value it brings to your business. If it is must have, then you can use DOM manipulations. Just that for each upgrade, you will have to test the functionality.

 

Thank you,

Ali

 

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

View solution in original post

4 REPLIES 4

Ahmmed Ali
Mega Sage

Hello @Thi Dinh Nguyen 

 

As for as I know, it is not possible without DOM manipulation. If you want to avoid it, then you can consider the other workaround such as writing onSubmit client script to restrict the submission of the form.

 

But again, it depends on value it brings to your business. If it is must have, then you can use DOM manipulations. Just that for each upgrade, you will have to test the functionality.

 

Thank you,

Ali

 

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

Karan Chhabra6
Mega Sage
Mega Sage

Hi @Thi Dinh Nguyen ,

 

Instead of disabling the button, you can think of restricting the form submission based on the conditions using onSubmit client script.

Please refer to this thread :  https://www.servicenow.com/community/now-platform-forum/how-can-we-disable-submit-button-on-service-...

 

If my answer has helped with your question, please mark it as correct and helpful

 

Thanks!

Sandeep Rajput
Tera Patron
Tera Patron

@Thi Dinh Nguyen There are no OOTB configurations available to hide Submit button on Catalog item or Record producers. I came across a similar requirement from my customer in the past and I had to use DOM manipulation to hide the submit button. It has been three releases so far and the solution still works fine.

Thi Dinh Nguyen
Tera Expert

Thanks for all your help. Since the customer really stress about the hiding of the Submit button, I guess DOM manipulation is the only way then.