How to hide 'order now' button dynamically in a catalog without using DOM Manipulation

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2019 02:01 AM
Hello,
Does anyone have any alternatives of hiding the 'order_now' button in a catalog aside from using DOM Manipulations? I am aware that it's not best practice to use DOM Manipulation that's why I am trying to find other ways to hide the 'order now' button whenever a certain value in a field is selected.
Here is a screenshot of my Catalog Client Script which is working but not a best practice.
Any help would be appreciated. Thank you.
Kind Regards,
Raphael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2019 02:08 AM
Hi Raphael,
You are not using DOM manipulation here. jQuery is being used which should be fine
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2019 02:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2019 02:12 AM
if you want to hide only for particular catalog item then you can user No Order Now checkbox
if No Order Now is not on form then from form layout you can add to form.
then make Use of Cart Layout checkbox false and No Order Now checkbox false,
Thanks,
vishal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2019 02:29 AM
Hello Vishal,
I do not want to hide the 'order now' button permanently, I want it to hide based on a selected value in a field and to re-appear again once another value is selected from that same field. Thank you.