How to add submit button in catalog item internally

Mandy11
Tera Contributor

Hi everyone !

I would like to add a Submit" button instead of "Order now" in only one of my catalogs items (internally).

Actually, I see this : 

find_real_file.png

And, I want this : 

find_real_file.png

 

Is it possible or this setting is purely for Service Portal ?

 

Thanks

 

Mandy 

 

1 ACCEPTED SOLUTION

@Mandy 

If you wish to still achieve this then do this

onLoad Client Script which applies on your catalog item

1) Ensure Isolate Script field is set to false for this client script

2) This field if not on form then from list make it false

find_real_file.png

Script:

function onLoad() {
	//Type appropriate comment here, and begin script below
	
	gel('window.cartContent').style.display = 'none';
	gel('add_to_cart_button').style.display = 'none';
	gel('sc_delivery_time_label_cell').style.display = 'none';
	gel('sc_delivery_time_cell').style.display = 'none';
	document.getElementById("order_now").innerHTML='Submit';

}

find_real_file.png

Output:

find_real_file.png

Regards
Ankur

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

View solution in original post

9 REPLIES 9

@Mandy 

If you wish to still achieve this then do this

onLoad Client Script which applies on your catalog item

1) Ensure Isolate Script field is set to false for this client script

2) This field if not on form then from list make it false

find_real_file.png

Script:

function onLoad() {
	//Type appropriate comment here, and begin script below
	
	gel('window.cartContent').style.display = 'none';
	gel('add_to_cart_button').style.display = 'none';
	gel('sc_delivery_time_label_cell').style.display = 'none';
	gel('sc_delivery_time_cell').style.display = 'none';
	document.getElementById("order_now").innerHTML='Submit';

}

find_real_file.png

Output:

find_real_file.png

Regards
Ankur

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

Thank you this was really useful.

Is there any way of hiding the 'Order this Item' text or renaming it.  It doesn't make sense to have this when the button has been changed to 'Submit'. 

I tried this method but still did not get the expected result.

Aman Singh_
Kilo Sage

Hi,

 

Try below and check once, make sure isolate script is false.

document.getElementById("oi_order_now_button").innerHTML='Submit';

find_real_file.png

Output

find_real_file.png

Mark Correct/helpful, if applicable, Thanks!!

Aman

Krystal2
ServiceNow Employee
ServiceNow Employee

How can we make this work for scoped application?