The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Change "Submit" button label

HOSSIN
Mega Contributor

I have a requirement to change the label of the "Submit" button to "Save as Draft" in a specific record producer. How can I do that?  Any idea? Thanks in advance.

11 REPLIES 11

Cody Smith _ Cl
Tera Guru

Hello Hossin,

 

Look at this community thread.  This should do what you're looking for. 

 

var button = document.getElementById('submit_button');


button.textContent = "Save as Draft";

 

I will point out though that ServiceNow does advice against DOM manipulation because this functionality could break later in the future. 

 

If my answer was helpful or answered your question, please mark it as 'Helpful' or 'Correct'
Thank you,
Cody Smith
 

I have already tried to use DOM , looks likes it is not working.I have also unchecked 

Document.getElementById returning null. Please see the attachment.

If DOM does not work, make an onLoad that only has 

function onLoad(){
   submit_button.textContent = 'Save as Draft';
}

I've seen it done both ways, and again you want to steer clear of DOM manipulation either way.

 

EDIT:

I just tried it in my Dev instance and it worked for me. 

find_real_file.png

find_real_file.png

It does not work.