SharePoint: Rename Save or Cancel button text on List Forms

This SharePoint tutorial, we will discuss, how to rename Save or Cancel button text in SharePoint 2013 list forms using JavaScript or jQuery. The same code we can use to rename Save or Cancel button text on SharePoint 2016/Online List Forms.

Here we are trying to rename Save to Submit and Cancel to Go Back through the script in SharePoint list form.

Rename SharePoint List Forms Save or Cancel button text using JavaScript

Below, is the JavaScript code to rename the SharePoint list form, Save and Cancel button which you can put in a script editor web part in the list forms.

Edit the newForm.aspx or editForm.aspx SharePoint list form and insert a script editor web part or content editor web part and then add the below code.

<script type="text/javascript">
function changeButtonText()
{
var inputs = document.getElementsByTagName("input");
for(i = 0; i<inputs.length; i++)
{
if(inputs[i].type == "button" && inputs[i].value == "Save")
{
inputs[i].value = "Submit";
}
if(inputs[i].type == "button" && inputs[i].value == "Cancel")
{
inputs[i].value = "Go Back";
}
}
}
_spBodyOnLoadFunctionNames.push("changeButtonText()");
</script>

Rename SharePoint List Forms Save or Cancel button text using jQuery

Below is the jQuery code to rename the SharePoint list form the Save or Cancel button using jQuery in SharePoint 2013/2016/Online.

Edit the newForm.aspx or editForm.aspx SharePoint list form and insert a script editor web part or content editor web part and then add the below code.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js" type="text/javascript"></script>
<script>
$(document).ready(function()
{
$("input[value$='Save']").attr('value', "Submit");
$("input[value$='Cancel']").attr('value', "Go Back");
});
</script>

Now if you can see it will appear like below:

rename Save or Cancel button text on SharePoint List Forms

You may like following SharePoint tutorials:

Here, we learned how to rename Save or Cancel button text on SharePoint 2013/2016/Online List Forms?

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

>