The CreatorCon Call for Content is officially open! Get started here.

Correct Way to Manipulate DOM in a Catalog Item

Bryan13
Tera Expert

I have a non-conventional Catalog Item that is used as a way to let the user update their organizational structure. There are no order related activities. Therefore, I have hidden those parameters using basic DOM manipulation. I am wondering if there is a ServiceNow way of accomplishing this? I could not figure out how to do it using g_form.

Here is how the page looked originally:

cat-item-before.PNG

Here is how it looks after manipulating the DOM:

cat-item-after.PNG

This is the Catalog Client Script I used. If there is a better way of doing this, please let me know.

catalog-item-script.PNG

1 ACCEPTED SOLUTION

Also check out this link. I think it contains the answer to your question.



Thanks,


Nitin



Hit Like, Helpful or Correct based in the impact of the response


View solution in original post

3 REPLIES 3

nitin_kumar
Mega Guru

Hi Bryan,



I you want the change to happen all over the instance ie., all catalog items you can do that from 'maintain cart layouts', this contains 'Item Ordering Widget'. You can change 'Order Now' label from here


Ensure 'glide.sc.use_cart_layouts' is true.



Thanks,


Nitin.



Hit Like, Helpful or Correct based in the impact of the response


Also check out this link. I think it contains the answer to your question.



Thanks,


Nitin



Hit Like, Helpful or Correct based in the impact of the response


I am marking this correct because it does give you some ability to change the cart layout. However, I would like to be able to change the section label and button label without making a global change for all catalog items. Thanks.




cart-layout.PNG