Catalog Item: Disable order/request/submit button based on variable value

Xavier_Wharton
Tera Guru

Hello Community,

 

I have a process owner who wants to disable the order/request/submit button if the requestor selects "no" on a specific variable. 

I added a video explanation for reference: https://youtu.be/65iwLAJr8as.

I'm new to scripting, so I would appreciate a complete answer with context 🙂.

How do I disable the submit button on a catalog item?
1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Xavier_Wharton 

if you want to show/hide the order/request button based on variable then you need to use onChange catalog client script and use DOM manipulation to achieve which is not recommended.

If you still wish to do then check the answer in below link and enhance it as per your requirement

Show/hide the submit button on catalog item form based on select box 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Juhi Poddar
Kilo Patron

Hello @Xavier_Wharton 

This can useful to you: How to disable the submit button in the catalog form if the variable choice option is Disagree 

 

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"

 

Thank You
Juhi Poddar

Ankur Bawiskar
Tera Patron
Tera Patron

@Xavier_Wharton 

if you want to show/hide the order/request button based on variable then you need to use onChange catalog client script and use DOM manipulation to achieve which is not recommended.

If you still wish to do then check the answer in below link and enhance it as per your requirement

Show/hide the submit button on catalog item form based on select box 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Xavier_Wharton 

Thank you for marking my response as helpful.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thank you @Ankur Bawiskar. You mentioned that DOM manipulation is not recommended. Can you explain why? Additionally I reviewed the link that you shared in your first response, but wasn't clear on what to do.