Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Changing button names in GlideModal UI Page

Nitesh Balusu
Giga Guru

Hello,

We have a custom GlideModal, please check the screenshot. I want to change names of the buttons from OK and Cancel to Create Incident and Cancel. How do I achieve this? Is it a simple modification of the UI Page, not working if I am changing the names there.

 

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

Jim Coyne
Kilo Patron

Replace your div with the following:

<div class="modal-footer">
	<span class="pull-right">
		<button class="btn btn-default" id="cancel_button" onclick="window.GlideModalForm.prototype.locate(this).destroy(); return false" style="min-width: 5em;" title="" type="submit">
			Cancel
		</button>
		<button class="btn btn-primary" id="ok_button" onclick="actionOK()" style="min-width: 5em;" title="" type="submit">
			Create Incident
		</button>
	</span>
</div>

View solution in original post

6 REPLIES 6

Sateesh Kumar 2
Kilo Guru

Article in this link should help you

https://www.oreilly.com/library/view/servicenow-application-development/9781787128712/02ece39c-8c10-4de9-9894-9d50bec5263c.xhtml

 

Thank you for you reply, but that link doesn't help me. It's showing how to make Ok and Cancel buttons perform some actions. All I need is, renaming "OK" to "Create Incident".

 

Gosia Urbanska
Tera Guru

you should create 2 regular html buttons with onclick functions

Jim Coyne
Kilo Patron

Replace your div with the following:

<div class="modal-footer">
	<span class="pull-right">
		<button class="btn btn-default" id="cancel_button" onclick="window.GlideModalForm.prototype.locate(this).destroy(); return false" style="min-width: 5em;" title="" type="submit">
			Cancel
		</button>
		<button class="btn btn-primary" id="ok_button" onclick="actionOK()" style="min-width: 5em;" title="" type="submit">
			Create Incident
		</button>
	</span>
</div>